I am using code igniter email library to send email, Emails sent to gmail account or yahoo account are working ok but when i try to sent the email on icloud account (ex. test171993@icloud.com) that email is not coming on icloud account. I am using this code to send email
$config = Array(
'protocol' => 'SMTP',
'smtp_host' => 'box397.bluehost.com',
'smtp_port' => 587,
'smtp_user' => 'info@virtualguestservices.com',//
'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("
");
$this->email->from('info@virtualguestservices.com');
$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);
}
In short the problem is that mail are going to domains like gmail, yahoo but mail are not going to domains like icloud, at&t etc.
Check your headers you might missing some thing . Other domains might check strict.