I send HTML emails with PHP's mail()
function with this header:
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html; charset=iso-8859-1\r\n";
Now, I want to embed an image. Should I just simply do that as simple as this?
<img src="http://www.example.de/images/image.png" alt="test" title="test" />
With this, a warning is shown if you open the email in Outlook etc., that images from an external server are embedded. Is it possible/better to use base64 encode like this?
<img src="data:image/png;base64,..." alt="test" title="test" />
Or are data URIs not supported by mail programs widely?
EDIT: Thank you for voting for close, because this question is "opinion-based". I do not think so, because I asked for this:
Or are data URIs not supported by mail programs widely?
I need a possibility for sending images in emails without loading them from my server. And I just want to know of any disadvantages or other methods.