09-21-2009, 01:49 PM
[eluser]BrandonDurham[/eluser]
I have an email helper set up that sends the contents of a submitted form to three different email addresses. One to my own personal email address (@amillionthingstodo.com) and two to my employer's email addresses (@adlucent.com). For some reason the two to my employer's addresses never actually arrive. Stranger yet, if I enter my own email address into contact form I quickly get a MAILER-DAEMON failure notice in my inbox that says the message wasn't delivered.
Any insight as to why this might be happening??
Here is the code for my helper:
I have an email helper set up that sends the contents of a submitted form to three different email addresses. One to my own personal email address (@amillionthingstodo.com) and two to my employer's email addresses (@adlucent.com). For some reason the two to my employer's addresses never actually arrive. Stranger yet, if I enter my own email address into contact form I quickly get a MAILER-DAEMON failure notice in my inbox that says the message wasn't delivered.
Any insight as to why this might be happening??
Here is the code for my helper:
Code:
function send_comment($fromname=NULL, $fromemail=NULL, $phone=NULL, $company=NULL, $comments=NULL)
{
if ($fromname == NULL || $fromemail == NULL || $phone == NULL) return false;
$CI =& get_instance();
$CI->load->library('email');
$CI->email->from($fromemail, $fromname);
$CI->email->to('[email protected]');
$CI->email->to('[email protected]');
$CI->email->bcc('[email protected]');
$CI->email->subject('SITE CONTACT');
$message = "Name: " . $fromname;
$message .= "\nEmail: " . $fromemail;
$message .= "\nPhone: " . $phone;
$message .= "\nCompany: " . $company;
$message .= "\nDate & Time Sent: " . date("l, F jS (g:iA)", strtotime(date('Y-m-d H:i:s')));
$message .= "\n===========================================================================";
$message .= "\n\n" . $comments;
$CI->email->message($message);
if ($CI->email->send()) return true;
return false;
}