Index: openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/project-manager-procs.tcl,v diff -u -r1.2.2.4 -r1.2.2.5 --- openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 9 Jul 2004 17:38:28 -0000 1.2.2.4 +++ openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 9 Sep 2004 23:58:21 -0000 1.2.2.5 @@ -414,15 +414,41 @@ @error } { - set nice_text [ad_html_text_convert -from $mime_type -to "text/plain" -- $body] + # HTML portions of this copied from notification::email::send + if {[string equal $mime_type "text/plain"]} { + set body_text $body + set body_html [ad_html_text_convert -from $mime_type -to "text/html" -- $body] + } elseif {[string equal $mime_type "text/html"]} { + set body_text [ad_html_text_convert -from $mime_type -to "text/plain" -- $body] + set body_html $body + + } else { + set body_text [ad_html_text_convert -from $mime_type -to "text/plain" -- $body] + set body_html [ad_html_text_convert -from $mime_type -to "text/html" -- $body] + + } + + # Use this to build up extra mail headers + set extra_headers [ns_set new] + + # This should disable most auto-replies + ns_set put $extra_headers Precedence list + + set message_data [build_mime_message $body_text $body_html] + ns_set put $extra_headers MIME-Version [ns_set get $message_data MIME-Version] + ns_set put $extra_headers Content-ID [ns_set get $message_data Content-ID] + ns_set put $extra_headers Content-Type [ns_set get $message_data Content-Type] + set content [ns_set get $message_data body] + foreach to $to_addr { acs_mail_lite::send \ -to_addr "$to" \ -from_addr "$from_addr" \ -subject "$subject" \ - -body "$nice_text" + -body $content \ + -extraheaders $extra_headers } }