PHP

SEND IMAGES WITH PHP MAIL

IMAGE HOSTED ON SERVER

MAIL MESSAGE $mailBody = "<img src='HTTP://SITE.COM/IMG.JPG'/>";   MAIL HEADER $mailHead = implode("\r\n", [   "MIME-Version: 1.0",   "Content-type: text/html; charset=utf-8" ]);   SEND MAIL mail("jon@doe.com", "Subject", $mailBody, $mailHead);

DIRECTLY EMBED INTO EMAIL

MAIL MESSAGE $img = file_get_contents('IMG.JPG'); $imgdata = base64_encode($img); $mailBody = "<img src='data:image/x-icon;base64,$imgdata'/>";   MAIL HEADER $mailHead = implode("\r\n", [   "MIME-Version: 1.0",   "Content-type: text/html; charset=utf-8" ]);   SEND MAIL mail("jon@doe.com", "Subject", $mailBody, $mailHead);