I use Drupal 6.4 and Simplenews 6.x-1.x-dev and simplenews.305650.patch from Restore Mime Mail support in D6 / post #26.
If send a mail in html format: (multi-part message in MIME format)

Hotmail (Windowslive) view the html source in text format.
All other mail system viewing correct html format.

The text/pain source of mail:

This is a multi-part message in MIME format.

--567883ee7f496c165ba65f819b3a3d11
Content-Type: multipart/alternative;
boundary="6316f4f4c825dc0ee1e16f6032539291"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

--6316f4f4c825dc0ee1e16f6032539291
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

test 3.

first line
second line
other text

Hotmail display:
test 3.

first line
second line
other text

CommentFileSizeAuthor
#5 mimemail_hotmail_fix_working_v1.patch8.05 KBaries

Comments

realdream’s picture

Sorry...

The html codes not visible in first text...

Message source:

This is a multi-part message in MIME format.

--567883ee7f496c165ba65f819b3a3d11
Content-Type: multipart/alternative;
    boundary="6316f4f4c825dc0ee1e16f6032539291"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit


--6316f4f4c825dc0ee1e16f6032539291
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

test 3.
<p>text<br />
text<br />
text<br />
 </p>

hotmail view: (not source, this is a normal hotmail view)

test 3.
<p>text<br />
text<br />
text<br />
 </p>


allartk’s picture

Seeing html source instead of plaintext: http://drupal.org/node/305650#comment-1050719

Hotmail is displaying plaintext instead of html is a different issue, which I will try to fix (some client sents out 1000+ newsletters and this has to work..)

allartk’s picture

Status: Active » Closed (fixed)

forgot to close the issue..

allartk’s picture

About hotmail: Hotmail will html show if your mail contains html only. I did some dirty scripting for that (maybe I will post a feature request to do this in a nice way).

I added a param hotmail to the function mimemail_html_body in mimemail.inc

function mimemail_html_body($body, $subject, $plaintext = FALSE, $text = NULL, $attachments = array(),$hotmail = false)

Arround line 300 in this function I changed
$content = array($text_part, array_shift($mime_parts));
into

  if($hotmail) {
  $content = array(array_shift($mime_parts)); }
  else {
  $content = array($text_part, array_shift($mime_parts));}

in mimemail.module I changed:

$mail = mimemail_html_body(theme('mimemail_message', $body, $mailkey), $subject, $plaintext, $text, $attachments); 

into

  if(strstr("live",mimemail_address($recipient)))
  { $hotmail = true; unset($headers['Content-Transfer-Encoding']);  } else { $hotmail = false; }
  $mail = mimemail_html_body(theme('mimemail_message', $body, $mailkey), $subject, $plaintext, $text, $attachments,$hotmail); 

This code is not very clean, but it solves the hotmail issue.

aries’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new8.05 KB

allartk gave some good thougts, I combined his ideas with mine, here's mine patch, working for hotmail and normal mails too.

jerdavis’s picture

Status: Needs review » Closed (duplicate)

The newest development snapshot should fix HTML emails in hotmail in a cleaner fashion. See http://drupal.org/node/310305