小弟用php的系统函数mail用sendmail发邮件,发现只可以发网易的邮箱,qq,sina 都不能发
下面是发网易邮箱成功的mail日志
Jul 14 10:59:58 unaryhost sendmail[3752]: o6E2xwm2003752: from=vpopmail, size=174, class=0, nrcpts=1, msgid=<[email protected]>, relay=vpopmail@localhost
Jul 14 10:59:58 unaryhost sendmail[3753]: o6E2xwkV003753: from=<[email protected]>, size=412, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=unaryhost.unarydomain [127.0.0.1]
Jul 14 10:59:58 unaryhost sendmail[3752]: o6E2xwm2003752: [email protected], ctladdr=vpopmail (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30174, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (o6E2xwkV003753 Message accepted for delivery)
Jul 14 10:59:59 unaryhost sendmail[3755]: o6E2xwkV003753: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120412, relay=126mx01.mxmail.netease.com. [220.181.15.137], dsn=2.0.0, stat=Sent (Mail OK queued as mx7,JcmowLDr78oxKD1M1krSAQ--.298S2 1279076401)
Jul 14 11:00:05 unaryhost sendmail[3725]: STARTTLS=client, relay=mx2.4cun.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul 14 11:00:05 unaryhost sendmail[3725]: o6E2whM3003723: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=00:01:22, xdelay=00:01:22, mailer=esmtp, pri=120406, relay=mx2.4cun.com. [202.102.86.237], dsn=4.7.1, stat=Deferred: 450 4.7.1 <[email protected]>: Recipient address rejected: Policy antispam: Temporarily resources unvailablePlease try later.这个是发不成功的日志Jul 14 11:30:24 unaryhost sendmail[4007]: o6E3UOwQ004007: from=vpopmail, size=168, class=0, nrcpts=1, msgid=<[email protected]>, relay=vpopmail@localhost
Jul 14 11:30:24 unaryhost sendmail[4008]: o6E3UOSB004008: from=<[email protected]>, size=406, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=unaryhost.unarydomain [127.0.0.1]
Jul 14 11:30:24 unaryhost sendmail[4007]: o6E3UOwQ004007: [email protected], ctladdr=vpopmail (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30168, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (o6E3UOSB004008 Message accepted for delivery)
请大牛帮帮忙,可以解决吗?如果不行 换方法也行啊,现在使用sendmail是不是不多了?
如果需要换方法那么需要用什么来发,请跟小弟说下,感激不进了。
下面是发网易邮箱成功的mail日志
Jul 14 10:59:58 unaryhost sendmail[3752]: o6E2xwm2003752: from=vpopmail, size=174, class=0, nrcpts=1, msgid=<[email protected]>, relay=vpopmail@localhost
Jul 14 10:59:58 unaryhost sendmail[3753]: o6E2xwkV003753: from=<[email protected]>, size=412, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=unaryhost.unarydomain [127.0.0.1]
Jul 14 10:59:58 unaryhost sendmail[3752]: o6E2xwm2003752: [email protected], ctladdr=vpopmail (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30174, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (o6E2xwkV003753 Message accepted for delivery)
Jul 14 10:59:59 unaryhost sendmail[3755]: o6E2xwkV003753: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120412, relay=126mx01.mxmail.netease.com. [220.181.15.137], dsn=2.0.0, stat=Sent (Mail OK queued as mx7,JcmowLDr78oxKD1M1krSAQ--.298S2 1279076401)
Jul 14 11:00:05 unaryhost sendmail[3725]: STARTTLS=client, relay=mx2.4cun.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jul 14 11:00:05 unaryhost sendmail[3725]: o6E2whM3003723: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=00:01:22, xdelay=00:01:22, mailer=esmtp, pri=120406, relay=mx2.4cun.com. [202.102.86.237], dsn=4.7.1, stat=Deferred: 450 4.7.1 <[email protected]>: Recipient address rejected: Policy antispam: Temporarily resources unvailablePlease try later.这个是发不成功的日志Jul 14 11:30:24 unaryhost sendmail[4007]: o6E3UOwQ004007: from=vpopmail, size=168, class=0, nrcpts=1, msgid=<[email protected]>, relay=vpopmail@localhost
Jul 14 11:30:24 unaryhost sendmail[4008]: o6E3UOSB004008: from=<[email protected]>, size=406, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=unaryhost.unarydomain [127.0.0.1]
Jul 14 11:30:24 unaryhost sendmail[4007]: o6E3UOwQ004007: [email protected], ctladdr=vpopmail (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30168, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (o6E3UOSB004008 Message accepted for delivery)
请大牛帮帮忙,可以解决吗?如果不行 换方法也行啊,现在使用sendmail是不是不多了?
如果需要换方法那么需要用什么来发,请跟小弟说下,感激不进了。
这是什么原因啊 各位大牛 帮帮看看啊 Jul 14 11:30:45 unaryhost sendmail[4010]: o6E3UOSB004008: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=00:00:21, xdelay=00:00:21, mailer=esmtp, pri=120406, relay=mx3.qq.com. [119.147.10.220], dsn=5.0.0, stat=Service unavailable
Jul 14 11:30:45 unaryhost sendmail[4010]: o6E3UOSB004008: o6E3UjSB004010: DSN: Service unavailable
Jul 14 11:30:45 unaryhost sendmail[4010]: o6E3UjSB004010: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31640, dsn=2.0.0, stat=Sent
但是你需要找一个发件地址,并且支持 POP 协议。祝您好运
require("class.phpmailer.php");$mail = new PHPMailer();$mail->IsSMTP(); // send via SMTP
$mail->Host = "smtp.mail.qq.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "411355481"; // SMTP username
$mail->Password = "8072336jing"; // SMTP password
$mail->From = "[email protected]";
$mail->FromName = "sjw";
$mail->AddAddress("[email protected]","Josh Adams");
$mail->AddAddress("[email protected]"); // optional name
$mail->AddReplyTo("[email protected]","Information");$mail->WordWrap = 50; // set word wrap
//$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg");
$mail->IsHTML(true); // send as HTML$mail->Subject = "Here is the subject";
$mail->Body = "This is the <b>HTML body</b>";
$mail->AltBody = "This is the text-only body";if(!$mail->Send())
{
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}echo "Message has been sent";
我用了phpmailer可是不知道哪里配置错误了还是发送不成功啊smtp服务器不能连接啊
Could not connect to SMTP host