Benches macOS

6

Mail rendering multipart/alternative mess…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Are there any known issues with Mail regarding the display of multipart/alternative messages? Messages I've sent as multipart/alternative render as expected in webmail and Thunderbird on OS X. Messages are being send with PEAR::Mail_mime and that package is handling all the headers. I've double-checked the headers as well as I know how and they seem to be fine.

I've read this post:
http://discussions.apple.com/thread.jspa?threadID=1647884&tstart=0 which indicates that Mail might have issues with multipart/alternative, or multipart/mixed at least.

If there are no known issues with Mail handling mutlipart/alternative messages, are there some key headers that need to be set for Mail to display them correctly? I've compared headers for messages sent by Mail (to myself) and mail sent otherwise, and I don't notice anything that would cause them to render differently.

6 replies

Sign in or join Beachball Help to reply.

  1. 0

    Mulder

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Do these messages render correctly on your Mac, but not the recipients' Mac? Are these HTML messages?

    Mulder

  2. 0

    lolotov

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    These are multipart messages, they contain plain text and html content. Their headers are set with Content-type: multipart/alternative and have a boundary set as well.

    Here is the raw source of a message. If you see anything I've missed regarding headers or anything, please let me know:

    Return-Path: <anonymous@103776-domain>

    Delivered-To: [email protected]

    Received: (qmail 14455 invoked from network); 4 Aug 2008 17:27:54 -0500

    Received: from domain (HELO 103776-domain) (72.32.155.210)

    by 192.168.1.212 with (DHE-RSA-AES256-SHA encrypted) SMTP; 4 Aug 2008 17:27:54 -0500

    Received: (qmail 2638 invoked by uid 48); 4 Aug 2008 17:27:24 -0500

    Date: 4 Aug 2008 17:27:24 -0500

    Message-ID: <20080804222724.2633.qmail@103776-domain>

    To: [name] <[email protected]>

    Subject: [Some subject]

    MIME-Version: 1.0

    From: [name] <[email protected]>

    Content-Type: multipart/alternative; boundary="=_27d0b21e07eb49dc5bc5574cf81233d9"

    --=_27d0b21e07eb49dc5bc5574cf81233d9

    Content-Transfer-Encoding: 7bit

    Content-Type: text/plain; charset="ISO-8859-1"

    taf2 plain text

    --=_27d0b21e07eb49dc5bc5574cf81233d9

    Content-Transfer-Encoding: quoted-printable

    Content-Type: text/html; charset="ISO-8859-1"

    sdasdf

  3. 0

    Mulder

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Well, I never send HTML email so I couldn't tell you whether or not the headers are correct or if it requires anything else. But if you open Safari and go to any web page and use the Mail Contents of This Page command, it will open Mail and insert the page, graphics and all. You can also add text to that email.

    If you then view the raw source of that message, you'll see what Mail requires in terms of sending headers for HTML web pages; that would probably help you more.

    Mulder

  4. 0

    lolotov

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The messages are not being sent from Mail.app. They are being sent from our webserver using the PEAR::Mail packages.

    I've compared headers sent by Mail.app to headers sent by our server, and haven't noticed anything very different. I will compare to Safari's output and see what I can find though.

  5. 0

    DarkroomMTL

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    lolotov wrote:

    Content-Type: multipart/alternative; boundary="=_27d0b21e07eb49dc5bc5574cf81233d9"

    --=_27d0b21e07eb49dc5bc5574cf81233d9

    Content-Transfer-Encoding: 7bit

    Content-Type: text/plain; charset="ISO-8859-1"

    taf2 plain text

    --=_27d0b21e07eb49dc5bc5574cf81233d9

    Content-Transfer-Encoding: quoted-printable

    Content-Type: text/html; charset="ISO-8859-1"

    sdasdf

    i believe you are missing your 3rd and final boundry that is necessary after your HTML code, and also should have two hyphens "--" added at the end of the 3rd boundry. IE:

    Content-Type: multipart/alternative; boundary="=_27d0b21e07eb49dc5bc5574cf81233d9"

    --=_27d0b21e07eb49dc5bc5574cf81233d9

    plain text

    --=_27d0b21e07eb49dc5bc5574cf81233d9

    html code

    --=_27d0b21e07eb49dc5bc5574cf81233d9 --

    (without the space between the random hash and the last 2 hyphens, this message board strokes out the line if i don't put a space there... you get the idea)

    also, make sure there are no blank lines between your boundaries and your Content-Transfer-Encoding lines as Mail has a (very dumb) problem with understanding the information if there are spaces present between these lines.

    Message was edited by: DarkroomMTL

    Message was edited by: DarkroomMTL

    Message was edited by: DarkroomMTL

  6. 0

    lolotov

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Holy Frost-wyrm batman!

    Thanks for the reply! We actually just reverted to sending plain-text messages. On an off-chance I checked this thread again. I'm going to investigate your suggestions. I want to mark your answer helpful, but I don't know if I'll be able to mark it as solved once I do. I'll hopefully get back to this thread within the day.