diff --git a/mailboxes/CHANGELOG b/mailboxes/CHANGELOG index cfbd05118..867460a05 100644 --- a/mailboxes/CHANGELOG +++ b/mailboxes/CHANGELOG @@ -64,3 +64,6 @@ Messages with alternate HTML and text bodies are now send with the multipart/alt The original sender's email address is now included in the 'wrote' line when replying to or forwarding a message. ---- Changes since 1.480 ---- Mail with HTML and text bodies now uses a multipart/alternative sub-attachment, so that other attachments are shown properly in mail clients like Hotmail and Yahoo. +---- Changes since 1.490 ---- +Put text/plain alternative body part before text/html, to be compliant with RFC +2046. diff --git a/mailboxes/send_mail.cgi b/mailboxes/send_mail.cgi index dec98927d..b5a0fa895 100755 --- a/mailboxes/send_mail.cgi +++ b/mailboxes/send_mail.cgi @@ -102,14 +102,14 @@ if ($in{'body'} =~ /\S/) { local @alts = ( $attach[0] ); local $mt = "text/plain; charset=$charset"; if ($plainbody =~ /[\177-\377]/) { - push(@alts, + unshift(@alts, { 'headers' => [ [ 'Content-Type', $mt ], [ 'Content-Transfer-Encoding', 'quoted-printable' ] ], 'data' => quoted_encode($plainbody) }); } else { - push(@alts, + unshift(@alts, { 'headers' => [ [ 'Content-Type', $mt ], [ 'Content-Transfer-Encoding', '7bit' ] ],