admin管理员组

文章数量:1559090

header("content-type:text/html;charset=utf-8");

require_once './email.class.php';

$name = "iojdsfajijd";

$mobile = "13344448888";

if (!empty($name) && !empty($mobile)){

$smtpserver = "smtp.exmail.qq";

$smtpserverport = 25;

$smtpusermail = "om@xxx";

$smtpmailtos = array("xxx@qq");

$smtpuser = "om@xxx";

$smtppass = "mypassword";

$mailsubject = "来源网页:".$_server['http_host'].$_server['request_uri'];

$mailbody = '';

$br="\r\n";

$mailbody .= "姓名:".$name.$br;

$mailbody .= "电话:".$mobile.$br;

$mailtype = "text";

$smtp = new smtp($smtpserver,$smtpserverport,true,$smtpuser,$smtppass);

$smtp->debug = true;

foreach ($smtpmailtos as $smtpmailto){

$sendstate=$smtp->sendmail($smtpmailto, $smtpusermail, $mailsubject,$mailbody,$mailtype);

}

// if ( $sendstate==1 ){

$list = array('name'=>$name,'tel'=>$mobile);

$json = json_encode($list);

echo $json;

//}

}

cdn用百度云和加速乐都出现了这种问题。我目前是用的百度云

我的邮件发送代码如上,在没用cdn的服务器上是可以正常发送邮件的,用了cdn之后,邮件发送出现如下报错:

cannot connenct to relay host smtp.exmail.qq

connection timed out (110)

cannot send email to xxx@qq

解决过的办法:

iptables 出端口全部绿灯

php版本:5.6 检查了php.ini 和 allow_url_fopen = on,disable_function 没用 fsock和fsockopen函数,请问是怎么回事呢?求解答,谢谢

本文标签: 腾讯发送邮件企业邮箱邮箱