0
我使用的代碼點火器,電子郵件庫來發送電子郵件,發送到Gmail帳戶或Yahoo帳戶的電子郵件正在確定,但是當我嘗試發送的電子郵件上的iCloud帳戶(恩。[email protected])的電子郵件是不是來的iCloud帳戶。我使用此代碼來發送電子郵件電子郵件發送至笨電子郵件庫中的iCloud電子郵件帳戶不來
$config = Array(
'protocol' => 'SMTP',
'smtp_host' => 'box397.bluehost.com',
'smtp_port' => 587,
'smtp_user' => '[email protected]',//
'smtp_pass' => '*********',// password of above email
'mailtype' => 'html',
'charset' => 'utf-8',
'wordwrap' => TRUE
);
$message = '<h3>Hi,<br/><br/>
We have received a request to reset the password for your account registered with User Id '.strtoupper($userId).'. You will be asked to change this password on login for security purpose.<br/><br/>
Your new password is '.$newPassword.'.<br/><br/>Thanks</h3>';
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]');
$this->email->to($emailAddress);
$this->email->subject('Request for New Paswword.');
$this->email->message($message);
if($this->email->send())
{
$message = [
'status' => 1,
'message' => "New password has been sent to your email address.",
];
$this->set_response($message,REST_Controller::HTTP_OK);
}
else
{
$message = [
'status' => 0,
'message' => show_error($this->email>print_debugger()),
];
$this->set_response($message,REST_Controller::HTTP_OK);
}
總之,問題是郵件會喜歡Gmail,雅虎郵件,但域不會像icloud的領域,在&牛逼等
檢查你的電子郵件日誌。檢查您的域名是否有適當的DNS記錄,如SPF和DKIM。 – dobaniashish