My newest client needs a mailing list program that can send emails with images
I descided to go with sending html emails
Here is the script that i found and modified. it works but hotmail completly blocks it, yahoo sends emails to bulk mail and Gmail comes in perfectly.
can any one help me make this script work in all emails clients
the previous page submits
$to (emails seperated by ";" )
$from
$subject
$body (massage to be put in to html and sent)
$image (image name added to bottom of the email)
SCRIPT
$body = wordwrap($body, 75);
$temp="<html>";
$temp.="<head></head><body>";
$temp.="<center>";
$temp.="<table bgcolor=\"black\" width=\"500\" cellpadding=\"0\" cellspaceing\"0\">";
$temp.="<tr>";
$temp.=" <td bgcolor=\"#990000\">";
$temp.=" <img src=\"http://www.cafehookahlv.com/images/cafehookahermailtop.jpg\" width=\"500\">";
$temp.=" </td>";
$temp.="</tr>";
if($body){
$temp.="<tr>";
$temp.=" <td bgcolor=\"white\"><pre style=\"padding:10px;\">$body</pre></td>";
$temp.="</tr>";
};
if($imagename){
$temp.="<tr>";
$temp.=" <td align=\"center\"><img src=\"http://www.cafehookahlv.com/images/$imagename\"></td>";
$temp.="</tr>";
};
$temp.="</table>";
$temp.="</center>";
$temp.="</body></html>";
$to1 = explode(";", $to);
$type = array('gif' => 'image/gif',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'jpe' => 'image/jpeg',
'bmp' => 'image/bmp',
'png' => 'image/png',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'swf' => 'application/x-shockwave-flash',
'doc' => 'application/x-msword',
'xls' => 'application/x-msexel',
'bilinmiyor' => '"application/x-unknown-content-type"');
$header="";
$boundary='79ericlabar79';
$priorities = array( '1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)' );
$priority=$priorities[3];
$charset="iso-8859-9";
$ctencoding="7bit";
$sep= chr(13) . chr(10);
// $message .= "--$boundary\n Content-Type: text/plain; charset=\"$charset\"\n";
// $message .= "Content-Transfer-Encoding: $ctencoding\ \n";
//$message .= "--$boundary\n";
// $basename=basename($path[$i]);
// $message .= "Content-Type: text/html; charset=\"$charset\"\n";
// $message .= "Content-Transfer-Encoding: base64\n";
// $content = chunk_split(base64_encode($temp));
// $message .= $content;
$message .= "--$boundary\n";
$message .= "Content-type: text/html; \r\n name=\"cafehooka.html\"\n";
$message .= "Content-Transfer-Encoding: base64\n";
$message .= "Content-Disposition: inline\n";
$message .= "filename=\"cafehooka.html\"\n";
$content = chunk_split(base64_encode($temp));
$message .= $sep.$content;
$message .= "--$boundary--\n";
//______________________________header__________________
$header .= "From: $from\n";
//$header .= "X-Priority: $priority\n";
//$header .= "CC: $cc\n";
$header .= "Mime-Version: 1.0\n";
$header .= "Content-Type: multipart/mixed;";
$header .= " boundary=\"$boundary\"\n";
$header .= "Content-Transfer-Encoding: $ctencoding\n";
$header .= "X-Mailer: Php/libMailv1.3\n";
//______________________________header__________________
$i=0;
while($to1[$i]){
mail($to1[$i],$subject,$message."\n",$header);
$i++;
}
echo($to);
echo("<br>");
echo($subject);
echo("<br>");
echo($message);
echo("<br>");