1

My codeigniter mail was working fine for few days. but from yesterday onwards the mail is going to spam for company emails. but it is going to inbox in yahoo and gmail accounts. i tried using phpmailer, sendgrid etc. and also tried sending mail from gmail as well but stil these mails are going to spam.

i came to know that email sending to email_id@my_domain.ae is sending emails to spam folder.

is there any modifications that are to be made in the hosting server or something? my company mails are configered in etisalat.

This is the code i am using:

           $config = Array(
               'protocol' => 'smtp', # 'sendmail',
               'smtp_host' => 'ssl://smtp.googlemail.com',
               'smtp_port' => 465,
               'smtp_user' => '******@gmail.com',
               'smtp_pass' => '******',

               'mailtype' => 'html',
               'mailpath' => '/usr/sbin/sendmail',
               'charset' => 'iso-8859-1'
           );
           $this->load->library('email', $config);
           $this->email->set_newline("\r\n");
           $this->email->from($from_email, 'IT Support');
           $this->email->to($to_email);
           $this->email->subject($subject);
           $this->email->message($body)->set_mailtype('html');
           $this->email->send();

0 Answers0