There's a problem with Phpmailer e-mail
Require_once (' class.phpmailer.php '); The downloaded file must be placed in the directory where the file is located
$address =$_post[' address ';
echo $address. "
";
$mail = new Phpmailer (); Set up a mail sending class
$address = $_post[' address '];
$mail->issmtp (); Send using SMTP mode
$mail->host = "smtp.163.com"; Your enterprise Post office domain name
$mail->smtpauth = true; Enable the SMTP authentication feature
$mail->username = "[email protected]"; Post Office User name (please fill in the full email address)
$mail->password = "********"; Post Office password
$mail->from = "[email protected]"; Email Sender Email Address
$mail->fromname = "";
$mail->addaddress ("$address", "QQ"), or/or the recipient's address, can be replaced by any email message you want to receive,
$mail->subject = "phpmailer test mail"; Message header
$mail->body = "Hello, this is Test mail"; Message content
$mail->altbody = "The body in plain text for non-html mail clients"; Additional information, you can omit
if (! $mail->send ())
{
echo "message failed to send.
";
echo "Error Reason:". $mail->errorinfo;
Exit
}
echo "Mail sent successfully";
?>
Warning:preg_match () [Function.preg-match]: compilation failed:reference to non-existent Subpattern @ offset 626 in C: \ Program Files\apache software foundation\apache2.2\htdocs\class.phpmailer.php on line 667
Message delivery failed.
Error reason: Must provide at least one recipient email address.
Share to:
------Solution--------------------
Whether your 163 account is a valid account. Try QQ mailbox can send?
$mail->addaddress ($address); Try this.