The problem that I'm facing is that I have coded the entire template page inside the page that sends the newsletter. It is something like this:
Code: Select all
$html = "<html><head><title>Newsletter</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head>";
$html .= "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\" alink=\"#000000\" leftmargin=\"0\" topmargin=\"15\" marginwidth=\"0\" marginheight=\"0\"><font face=\"Arial, Helvetica, sans-serif\"><div align=\"center\">";
$html .= "etc etc etc";
// somewhere else in the code:
$mail = new PHPMailer();
$mail->Body = $html;
$mail->IsHTML(true);
...
$mail->Send();There has got to be an easier way of doing this. Any help is greatly appreciated.
Thanks a lot,
HEMOglobina
PS: The page that I want to send is full of PHP commands that reads from the DB... just in case this matters.