Multithreaded messages do not display correctly in gmail on iPhone. I have:
$message->setBody($this->body, 'text/html'); $message->addPart($this->text_body, 'plain/text');
I also used:
$message->addPart($this->body, 'text/html'); $message->addPart($this->text_body, 'plain/text');
But in both cases, when reading gmail from iPhone, I get a message as a "MIME application" ... No html and MIME attachments cannot even be read. The message will be displayed perfectly if I do not add the text part ...
Any ideas?
You need to do:
$message->setBody($your_plain_text_email_here); $message->addPart($your_html_email_here, 'text/html');
I had exactly the same question, and it worked for me in the Mac email application, the iPhone and Horde mail application (webmail, it appeared as plain text.)
, , - Google, , - . mime - /, /, :
$message->addPart($this->text_body, 'text/plain');
, , :
$message->setBody($this->body, 'multipart/alternative'); $message->addPart($this->body, 'text/html'); $message->addPart($this->text_body, 'text/plain');
I will need to see the source code of the email in order to be able to indicate the reason why you are having problems.
$message->setBody($this->body, 'multipart/alternative'); $message->addPart($this->body, 'text/html'); $message->addPart($this->text_body, 'plain/text');
As far as I can see, there is no email class that complies with RFC rules. I created my own as well as the built-in SMTP server in it, so it does not send email directly through mail ().