How can I send an HTML-formatted email with pictures using PHP?
I want to have a page with some settings and HTML output which is sent via email to an address. What
Simplest way is probably to just use Zend Framework or any of the other frameworks like CakePHP or Symphony.
You can do it with the standard mail
function too, but you'll need a bit more knowledge on how to attach pictures.
Alternatively, just host the images on a server instead of attaching them. Sending HTML mail is documented in the mail
function documentation.
The trick is to know the content id of the Image mime part when building the html body part. It boils down to making the img tag
https://github.com/horde/horde/blob/master/kronolith/lib/Kronolith.php
Look at the function buildMimeMessage for a working example.