Fix order of alternative parts

This commit is contained in:
Jamie Cameron
2009-11-28 21:25:03 -08:00
parent 4f8dae5d54
commit c0f86b2603
2 changed files with 5 additions and 2 deletions

View File

@@ -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.

View File

@@ -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' ] ],