Php mail() not sending


#1

I’m using an email form on my web site: http://www.pandaredpanda.com/contact.html

The php mail() function worked for the first few test emails but then stopped sending because I didn’t have the from header set correctly.

I have since changed the php code to the dreamhost recommended code:

$to_email = incoming@my_awesome_domain.com;
$your_email = administrator@my_awesome_domain.com;
$header = "From: " . $your_email . “\r\n”;
$header .= "Reply-To: " . $visitor_email . “\r\n”;
$subject = "Contact Form Submission from " . $visitor_name;
$emailMessage = "Name: " . $visitor_name . “\r\n”;
$emailMessage .= "Email: " . $visitor_email . “\r\n”;
$emailMessage .= "Message: " $message . “\r\n”;
mail($to_email, $subject, $emailMessage, $header);

but email is still not sending and it’s also not showing up in Maildir.
Is it possible that my to_email is now on a dreamhost spoofing black list?


#2

You did change ‘administrator@my_awesome_domain.com’ to a valid email address @pandaredpanda.com correct?
and the $to_email was also set to a panadaredpand.com email address?


#3

Yes, I didn’t want to post the real addresses here for every bot on the net to scrap. I’m still waiting for a response from dreamhost.


#4

You haven’t put the From: address in the mail() call. Give that a try.


#5

Yes, I’ve already done this. Initially I was putting the Site Visitors email in the from address which triggered the stoppage but now that I’ve changed the from address to the dreamhost recommended method it’s still not working. No mail can be sent via the php mail() function from my dreamhosted site. I’m still waiting for a response from dreamhost.


#6

Having the same issue – all previously working php mail() forms stopped working. The last submission I got was 12:41pm EST yesterday (Thursday). Subsequent test submissions have not shown up. I don’t know how much delay there is before reaching maildir, but they’re not in there.

EDIT: As I submitted this, a form submission from 10:15 this morning came through (a few hours late). Hoping the rest will show up.


#7

Could be mail queueing up.

It’s a good idea to use the -f switch in the mail() function to avoid any problems with $header parsing.