1

Our donation website sends emails when a user signs up, donates etc. I've gotten many complaints that donors are getting blank emails. Upon further investigation it turns out that all these donors have apple emails i.e. @mac.com, @me.com @icloud.com etc...

So I got a hold of a Mac, created an email with the mail app for an iCloud account. Made a test donation, and received an email. When viewing on the mail app, I see on the left side as a preview of the text

Thanks for donating to ... [the subject]
This message has no content. [the body preview]

The right pane, showed the subject as well, but completely blank for the body.

Also worth noting, the same issue is on iOS (I borrowed my friend's iPhone 6 plus). However, on my android I used the outlook app and logged in to my icloud, and there the body text was indeed there!

I'm guessing it's possible the html of the email isn't parsed correctly by some Apple software...

All searches for the issue yielded solutions to a specific user experiencing this issue, but my issue is about the email message itself on an Apple email client.

Can someone point me in the right direction? Is there a specific html standard for apple emails?

  • Is there a possibility of pasting or linking some samples? – caseynolan Mar 7 '16 at 19:45
  • Also, are you able to check if the messages are coming through ok with the iCloud website? – caseynolan Mar 7 '16 at 19:49
  • 1) I'm not sure what would be the correct sample to provide. The message from the server is basic html (divs and tables etc). Maybe there's a clue in the raw message... If I can get the raw of the email received by icloud I'll put it up somewhere. 2) Other emails are received correctly in icloud website. Only the HTML emails from my server are missing the body. – scrollup Mar 7 '16 at 19:56
1

It turns out the issue has to do with the content headers and how the email clients are interpreting them.

Originally, the HEADER was set to Content-Type: multipart/related; and the body was structured as

multipart/alternative
    text/plain
    text/html

It seems the iOS and apple clients weren't able to parse multipart/related correctly.

I solved it by changing the header to Content-Type: multipart/alternative; and then structured the body as

    text/plain
    text/html

Here is the mail library I was using https://github.com/opencart/opencart/blob/1.5.5.1/upload/system/library/mail.php

Similar discussion here https://stackoverflow.com/questions/19497672/multipart-messages-including-multiple-attachments-attachment-and-inline-wi

And here https://stackoverflow.com/questions/7766943/mime-multipart-related-structure-and-apple-mail-is-it-a-bug

  • Follow-up: There still seem to be clients experiencing this issue. If anyone has a definite explanation please share. – scrollup Dec 22 '16 at 2:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .