Possible Duplicate:
How to send email with attachment using PHP?
PHP mail() attachment problems
I'm trying to implement this script: Send PHP HTML mail with attachments
The only thing I've modified in the script was the send-to address and the file. I'm trying to attach an .mp3
file instead of a .zip
file - maybe this is the reason I'm getting unexpected results?
The .mp3
file is only 31kb
But when I receive the email, there is no attachment and no HTML formatting in the message.
The email message contains:
--PHP-mixed-a80d597fc7c02e67ff5be867c7a48bab
Content-Type: multipart/alternative; boundary="PHP-alt-a80d597fc7c02e67ff5be867c7a48bab"
--PHP-alt-a80d597fc7c02e67ff5be867c7a48bab
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hello World!!!
This is simple text email message.
--PHP-alt-a80d597fc7c02e67ff5be867c7a48bab
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
<h2>Hello World!</h2>
<p>This is something with <b>HTML</b> formatting.</p>
--PHP-alt-a80d597fc7c02e67ff5be867c7a48bab--
--PHP-mixed-a80d597fc7c02e67ff5be867c7a48bab
Content-Type: application/zip; name="attachment.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment
SUQzAwAAAAABIVRQRTEAAAAfAAAB//5DAGgAZQBlAHMAZQBDA.....