0

Possible Duplicate:
How do you make sure email you send programmatically is not automatically marked as spam?

I am sending using codeigniter email library. i am usimg SMTP PROTOCOL.

    $this->load->library('email');
    $config = array(
        'mailtype' => 'html',
        'protocol' => 'smtp',
        'smtp_user' => 'xxxx@gmail.com',
        'smtp_pass' => 'xxxx',
        'smtp_port' => '465',
        'smtp_host' => 'ssl://smtp.gmail.com',
        'mail_path' => 'ssl://smtp.gmail.com'
        );
    $this->email->initialize($config);
    $this->email->set_newline("\r\n");
        $this->email->from("xxxx@gmail.com","xxxx");        
        $message = "Dear Admin,<br /><br />";
    $this->email->subject('Notification');
    $this->email->message($message);
    $this->email->send();

Email is sending perfectly but its going to spam. I want to inbox

Community
  • 1
  • 1
Alizain Prasla
  • 744
  • 2
  • 15
  • 37

1 Answers1

0

That example is triggering gmail's spam filter. Provide some actual content with wording that looks important. Or at least not like spam.

$message = "Dear firstname lastname,<br /><br />As you have chosen on the setup page, you are receiving this message to indicate that the requested threshold has been reached.";
$this->email->subject('Notification for recurring bill payment');
$this->email->message($message);
wallyk
  • 56,922
  • 16
  • 83
  • 148