一、自己的企業郵局發信
$mail = new PHPMailer();
//$body = file_get_contents("mail/".$date.".html");
//$body = eregi_replace("[\]",'',$body);
$body =$html;
$mail->Host = "mail.52shici.com"; // SMTP server
$mail->SMTPDebug = 0; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "mail.52shici.com"; // sets the SMTP server
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "webmaster@52shici.com"; // SMTP account username email地址要完整
$mail->Password = "123456789"; // SMTP account password
$subject="感謝您註冊成爲52shici.com的會員";
(另外要設置好域名MX記錄,略)
二、通過163轉發
$mail = new PHPMailer();
//$body = file_get_contents("mail/".$date.".html");
//$body = eregi_replace("[\]",'',$body);
$body =$html;
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.163.com"; // SMTP server
$mail->SMTPDebug = 0; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = " smtp.163.com"; // sets the SMTP server
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "fengandeguozi"; // SMTP account username 只要@前面的部分
$mail->Password = "123456789"; // SMTP account password
$mail->SetFrom('[email protected]', '52shici.com');
$mail->AddReplyTo("[email protected]","52shici.com");
$subject="感謝您註冊成爲52shici.com的會員";
$mail->Subject = "=?utf-8?B?".base64_encode($subject)."?="; // 防止亂碼,記錄一下,差別在一個要寫完整郵件地址,一個只要填@前面的部分。
一、自己的企業郵局發信
$mail = new PHPMailer();
//$body = eregi_replace("[\]",'',$body);
$body =$html;
$mail->Host = "mail.52shici.com"; // SMTP server
$mail->SMTPDebug = 0; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "mail.52shici.com"; // sets the SMTP server
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "webmaster@52shici.com"; // SMTP account username email地址要完整
$mail->Password = "123456789"; // SMTP account password
$subject="感謝您註冊成爲52shici.com的會員";
(另外要設置好域名MX記錄,略)
二、通過163轉發
$mail = new PHPMailer();
//$body = file_get_contents("mail/".$date.".html");
//$body = eregi_replace("[\]",'',$body);
$body =$html;
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.163.com"; // SMTP server
$mail->SMTPDebug = 0; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = " smtp.163.com"; // sets the SMTP server
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "fengandeguozi"; // SMTP account username 只要@前面的部分
$mail->Password = "123456789"; // SMTP account password
$mail->SetFrom('[email protected]', '52shici.com');
$mail->AddReplyTo("[email protected]","52shici.com");
$subject="感謝您註冊成爲52shici.com的會員";
$mail->Subject = "=?utf-8?B?".base64_encode($subject)."?="; // 防止亂碼