0

this mail going to spam. when i change email->from then it goes to inbox. how to send email to inbox with this email id
$this->email>from("sweco@suzlon.com");

        $this->email->from("sweco@suzlon.com");
        $this->email->to("marmik0011@gmail.com");

        $this->email->subject($subject);       
        $this->email->message($body);
        $this->email->set_mailtype('html');

        $this->email->send();

this mail going to inbox.

        $this->email->from("info@gmail.com");
        $this->email->to("marmik0011@gmail.com");

        $this->email->subject($subject);       
        $this->email->message($body);
        $this->email->set_mailtype('html');

        $this->email->send();
  • gmail trying to find-out that `sweco@suzlon.com` is a valid gmail id or not? since it's not it goes to spam – Alive to die - Anant Aug 21 '17 at 06:14
  • Are you using a Gmail account to send emails? – Nima Aug 21 '17 at 06:27
  • The mail processing at suzlon.com is probably more picky than gmail. You should absolutely use SMTP to send email, as that will result in better email delivery to most domains. If possible, send your SMTP email through gmail, and you'd be almost completely assured that your emails will not be identified as spam (unless they have spammy content). – Brian Gottier Aug 21 '17 at 06:31
  • Try to use latest phpmailer, with full settings. Now a days spam filters are very advance. In my experience codeigniter mails does not work properly when using custom emails. I use PHPmailer for this issue – Deep 3015 Aug 21 '17 at 07:22
  • create email with this email on your host `sweco@suzlon.com` – Abdulla Nilam Aug 21 '17 at 08:04

1 Answers1

0

3 things you need to do:

  • FROM email should be existing (so create that one if not created)
  • Add FROM Name too Person Name <emailAddress>
  • Also, add an email address as Reply-to in headers
Naveed Ramzan
  • 3,565
  • 3
  • 25
  • 30