Posted by Der tolle Emil on 12/17/68 11:54
Hi!
I wrote a little function to send emails which works quite well. I already
managed to send attachments correctly (also more than 1 per email) but I am
not able to send a HTML mail containing a text only block for non-HTML
clients. I will not post the PHP code as I think it is irrelevant, the error
lies within the mail header and/or body, so here is the mail I do want to
send:
FROM: me <foo@bar.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="MIME_BOUNDARY"
--MIME_BOUNDARY
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
This is a multi-part message in MIME format.
navision://client/run?etcetc
--MIME_BOUNDARY
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
<html><body>
<a href="navision://client/run?etcetc">click me</a>
</body></html>
--MIME_BOUNDARY--
The first 3 lines are passed as the header to PHP's mail() function, whereas
the rest is passed as the body (starting with the first --MIME_BOUNDARY
line). If I send a mail this way I get the mail with the text/plain part
displayed and an ATT<random#>.html attachment containing the text/html part.
What exactly am I doing wrong?
Thank you!
Klaus.
Navigation:
[Reply to this message]
|