I've got a problem with sending MIME mail using PHP. When it hits a Mac using Entourage all they see is the coding for the email, it appears that Entourage doesn't support the MIME format by default. Does anyone know a way around this? Or is there a way to add "If you can't read this email please click here" above the content?
Entourage should be able to display HTML mails, but...
Sending HTML mail is criminally difficult using PHP.
Might I suggest you use a library like PHPMailer or Swift (www.swiftmailer.org) to send mails, as they have all of this kind of stuff worked out? It'll make you life a lot easier
It's a good idea to add a 'click here to view online' type link, but you'll need to code that yourself, and you'll also need to upload a copy of the mail onto your webserver where people can view the mail.
Any idea how I'd code the "click to view online" link into the email?
This tutorial shows an easy way using php mail().
The tute also shows how to send a plain text and html version of the email content in the one email, which imho is good practice. This way the email client decides which version to display.
It seems that the problem isn't with entourage, it appears to be when I send it to a network run off a local server the Mime format is ignored.
I looked at that turtorial, I don't really fancy coding up all the mime-boundaries and stuff when I need to attach a bunch of inline/ embedded images and other attachments. Let alone dealing with a bunch of server/ client discrepancies etc.
I'll just keep using Swift etc, thanks
@jonpugh: what exactly do you mean by:
when I send it to a network run off a local server
You're using a local mail server? Is it configured to allow/ use mime mails?
yep no problem
I used that code to build my own mail out script which retrieves the email content and mime type for any attachments from the database, inserts them in the appropriate locations in the script and it then sends both plain text and html format emails to recipients.