
May 11th, 2008, 01:42 PM
|
|
Registered User
|
|
Join Date: May 2008
Posts: 1
Time spent in forums: 14 m 21 sec
Reputation Power: 0
|
|
|
Problem with sending HTML emails
I created some system for sending mails to members about some events. That is HTML mail and have also simple Form for subscribing to events.
Everything is great but some users dont get HTML mail. They get just source code. This users are using Outlook Express and Windows XP.
I would porobably fix that but problem is that i see everything OK, and i dont know what to fix coz i cant see effects.
Function for sending mail is:
PHP Code:
function send_mail($from, $email, $subject, $text){
// MAIL
$header="";
$message="";
$boundary='--' . md5( uniqid("myboundary") );
$priorities = array( '1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)' );
$priority=$priorities[3];
$charset="UTF-8";
$ctencoding="8bit";
$subject=$subject;
$body=$text;
$to=$email;
$cc=$to;
$bcc=$to;
$sep= chr(13) . chr(10);
$ctype=$type["bilinmiyor"];
$message .="This is a multi-part message in MIME format.\n--$boundary\n";
$message .= "Content-Type: text/html; charset=$charset\n";
$message .= "Content-Transfer-Encoding: $ctencoding\n\n" . $body ."\n";
$header.="From: $from\nX-Priority: $priority\nCC: $cc\n";
$header.="Mime-Version: 1.0\nContent-Type: multipart/mixed;\n boundary=\"$boundary\"\n";
$header.="Content-Transfer-Encoding: $ctencoding\nX-Mailer: Php/libMailv1.3\n";
mail($to,$subject,$message."\n",$header);
}
I hope you understand me. I really need help and be very thankfull if we could fix that.
|