I am sending an email in html format. This is working fine, and I have simplified it for this example.
I need to take this simple code and add functionality to send (2) inline image files
(variable for filename is $clientlogo and $footerlogo). The image in the email when the email is opened. The file will already exist on the server. I know that some email programs block images, but it is necessary to send the image.
// heres the code without inline image stuff
$clientlogo = "/img/[login to view URL]";
$footerlogo = "/img/[login to view URL]";
$userfullname="test userfullname";
$prtitle="test pr title";
$prby="Dale Shad";
$useremail = "Daleshad@[login to view URL]";
$emailBody = "<center><img src=".$clientlogo."></center><br/>"
"<div style=font-family:Arial;font-size:11pt;>";
$emailBody .="Contact: ".$userfullname."<br/>";
$emailBody .="Email: ".$useremail."<br/><br/><br/>";
$emailBody .= "<center><div style=font-size:16pt;font-weight:bold;>".$prtitle."</div>";
$emailBody .= "<b>".$prby."</b></center>";
$fromemail ="Daleshad@[login to view URL]";
$to = "daleshad@[login to view URL]";
$subject = $emailSubject;
$body = $emailBody;
$headers = "From: <".$fromemail.">\r\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
if (mail($to, $subject, $body, $headers))
{echo("Done");}
else
{echo("failed...");}