IsSMTP(); // telling the class to use SMTP$mail->Host = "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 = ""; // SMTP account username email地址要完整Password = "123456789"; // SMTP account password
SetFrom(,'52shici.com');
AddReplyTo("");
注册成为52shici.com的会员";(另外要设置好域名MX记录,略)二、通过163转发$mail = new PHPMailer();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 = " Port = 25; // set the SMTP port for the GMAIL server$mail->Username = "只要@前面的部分Password = "123456789"; // SMTP account password$mail->SetFrom('lojinshui@163.com','52shici.com');$mail->AddReplyTo("lojinshui@163.com","52shici.com");$subject="感谢您注册成为52shici.com的会员"; $mail->Subject = "=?utf-8?B?".base64_encode($subject)."?=";