我正在使用SMTP。我的代码没有任何问题。输出成功发送但我没有收到电子邮件。当我在服务器中检查我的邮箱时,我的收件箱中收到一条消息,说由于缺少ptr记录而无法发送。
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
source code
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'] = 'mypass';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";
$config['mailtype'] = 'text';
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->to('ruedastefano@gmail.com');
$this->email->from('bjmpncr@thefourpobu.com', 'SJCDRRMO');
$this->email->reply_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();
}
}