job.answiz.com
  • 4
Votes
name
name Punditsdkoslkdosdkoskdo

Mail sent but not received, codeigniter Zoho Mail

i have this code as you can see i am using proper port number as its ssl
$config = Array(

        'protocol' => 'smtp',
        'smtp_host' => 'ssl://smtp.zoho.com',  //for ssl
        'smtp_port' => 465,
        'smtp_user' => '[email protected]', // change it to yours
        'smtp_pass' => 'xyz', // change it to yours
        'smtp_timeout'=>20,
        'mailtype' => 'html',
        'charset' => 'iso-8859-1',
        'wordwrap' => TRUE,
        'newline' => "
",
       'MAIL_ENCRYPTION'=>'ssl'
       );

$this->load->library('email',$config);

$this->email->from('[email protected]', 'demo');
$this->email->to('[email protected]');
$this->email->send();
echo $this->email->print_debugger();

message says email send successfully but i did not received email on my to email .

i checked logs to error logs .contacted zohoo they said they could not understand the issue.i am stuck from two days on this point 

U need to update your MX records. You need to configure the MX records of your domain in the DNS hosting provider (DNS Manager) to start receiving email to the users and groups created. You change the email service provider of the domain, only after this critical step. MX Records (Mail eXchange) are the special entries in DNS that designate the email-receiving server of your domain. Ensure that you have created the required user accounts and group accounts, before changing the MX. The MX Records of Zoho are: Host Name Address Priority @ mx.zoho.com 10 @ mx2.zoho.com 20 @ mx3.zoho.com 50 You must remove (delete) any other MX records other than the above 3 records.In case you have previous providers MX records, then you may not receive emails in Zoho. To view the instructions to change the MX record, select your domain's DNS Manager (DNS Hosting provider) from the list: Choose Your Domain Provider

  • 0
Reply Report

i found the solutiono need to inialize the settings separately 

$config = Array(

        'protocol' => 'smtp',
        'smtp_host' => 'ssl://smtp.zoho.com',  //for ssl
        'smtp_port' => 465,
        'smtp_user' => '[email protected]', // change it to yours
        'smtp_pass' => 'xyz', // change it to yours
        'smtp_timeout'=>20,
        'mailtype' => 'html',
        'charset' => 'iso-8859-1',
        'wordwrap' => TRUE,
        'newline' => " ",
       'MAIL_ENCRYPTION'=>'ssl'
       );

   $this->load->library('email');

    $this->email->initialize($config);

$this->email->from('[email protected]', 'demo');
$this->email->to('[email protected]');
$this->email->send();
echo $this->email->print_debugger();
  • 0
Reply Report