Hello all,
I'm trying to load a HTML file content, and then send it as the body of HTML email (as a newsletter). The mail is sent indeed , but I can't get the expected body. Please see my code and help.
Many thanks!
I'm trying to load a HTML file content, and then send it as the body of HTML email (as a newsletter). The mail is sent indeed , but I can't get the expected body. Please see my code and help.
Many thanks!
Code:
$host="myserver.secureserver.net";
$myFile = "[URL unfurl="true"]http://mywebsite.com/newsletter_site1.html";[/URL]
$fh = fopen($myFile, 'r');
$theData = fgets($fh);
fclose($fh);
//echo $theData;
mail("mosh@mywebsite.com", "TITLE!", "$theData", "From: my@gmail.com \nReply-To: my@gmail.com\n" . "MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1");