Index: openacs-4/packages/acs-mail-lite/tcl/complex-send-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/Attic/complex-send-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-mail-lite/tcl/complex-send-procs.tcl 29 Nov 2007 17:04:59 -0000 1.15 +++ openacs-4/packages/acs-mail-lite/tcl/complex-send-procs.tcl 29 Nov 2007 17:35:01 -0000 1.16 @@ -232,6 +232,9 @@ @param alternative_part_p Boolean whether or not the code generates a multipart/alternative mail (text/html) } { + # Send all emails as text/plain per default + set multi_token_type $mime_type + set mail_package_id [apm_package_id_from_key "acs-mail-lite"] if {$package_id eq ""} { set package_id $mail_package_id @@ -294,6 +297,8 @@ -encoding "quoted-printable" \ -string "$body"] } else { + set multi_token_type "multipart/alternative" + # build multipart/alternative if { $mime_type eq "text/plain" } { set message_text_part [mime::initialize -canonical "text/plain" \ @@ -328,6 +333,7 @@ if {[exists_and_not_null file_ids]} { + set multi_token_type "multipart/mixed" # Check if we are dealing with revisions or items. foreach file_id $file_ids { set item_id [content::revision::item_id -revision_id $file_id] @@ -349,6 +355,7 @@ # Append files from the filesystem if {$files ne ""} { + set multi_token_type "multipart/mixed" foreach file $files { lappend tokens [mime::initialize -param [list name "[ad_quotehtml [lindex $file 0]]"] -canonical [lindex $file 1] -file "[lindex $file 2]"] } @@ -363,14 +370,15 @@ where r.revision_id = i.latest_revision and i.parent_id = :folder_id} { lappend tokens [mime::initialize -param [list name "[ad_quotehtml $title]"] -canonical $mime_type -file "[cr_fs_path]$filename"] lappend item_ids $item_id + set multi_token_type "multipart/mixed" } } } #### Now we start with composing the mail message #### - set multi_token [mime::initialize -canonical multipart/mixed -parts "$tokens"] + set multi_token [mime::initialize -canonical $multi_token_type -parts "$tokens"] # Set the message_id set message_id "[mime::uniqueID]"