[英]server might not be configured to send mail using this method
我搜索了解决这些问题的所有可能解决方案,然后尝试但仍无法正常工作。我与我的服务器webpandahost联系,但他们表示服务器正在运行。
function send_email()
{
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'server.multimedia-street.com';
$config['smtp_port'] = '465';
$config['smtp_timeout'] = '7';
$config['smtp_user'] = 'bjmpncr@thefourpobu.com';
$config['smtp_pass'] = 'admin123';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";
$config['mailtype'] = 'text';
$this->email->initialize($config);
$this->email->from('bjmpncr@thefourpobu.com', 'SJCDRRMO');
$this->email->to('ruedastefano@gmail.com');
$this->email->subject('Password Reset');
$this->email->message('We have reset your request. Your new password: Do not reply to this email.');
if($this->email->send()) {
echo "success";
} else {
echo $this->email->print_debugger();
}
}
错误信息:
The IP address sending this message does not have a
550-5.7.1 PTR record setup. As a policy, Gmail does not accept messages from
550-5.7.1 IPs with missing PTR records. Please visit
550-5.7.1 https://support.google.com/mail/answer/81126#authentication for more
550 5.7.1 information. dn3si12455081pac.266 - gsmtp
尝试在标题中添加“回复”。
或者试试这个
$headers = "Organization: Sender Organization\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: PHP". phpversion() ."\r\n" ;
$headers .= "Reply-To: Sender Name <sender@yahoo.com>\r\n";
$headers .= 'From: Sender Name <sender@yahoo.com>' . "\r\n";
$headers .= "Content-Type: text/plain; charset=utf-8\r\n";
$headers .= "X-Priority: 1\r\n";
if (mail('sendTo@email.com', 'Subject', 'message', $headers)) {
"Mail successful.";
}else{
"Mail failed.";
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.