Sendmail and codeigniter

software development

#1

I have a shared hosting account with multiple domains. I am using CodeIgniter on one site, and I have a contact form. The controller is loading the email library and everything validates fine. No errors are thrown and in fact everything seems normal as if the email is sent, but when I check the address it’s supposed to send to (a gmail address), nothing in the inbox, and not going to spam.

[php]
$this->load->library(‘email’);
$this->email->from( "test@example.com", “Test” );
$this->email->to( "test2@example.com" );
$this->email->subject(“contact form test email”);
$this->email->message(“hello world”);
$this->email->send();
[/php]

any ideas?

thanks,

  • keith

#2

Is the “from” address also a GMail address? If so, the message will not go through — your web site is not GMail, so it shouldn’t be claiming to be GMail when sending mail. Use a sender address under your domain. (The address does not need to be set up as a mailbox, but it does need to be yours.)