No email sent with mail() PHP

software development

#1

Hi when im using the mail() funktion with php it doesnt send any email, is there something i should be aware of?

on my old webhotel the from field HAD TO BE a email that was created in the control panel at the host… is it the same here or could i use any from name to send?

I havent recieved the mails i send, and its 1 hour ago now?

I hope you guys can help;)


#2

The mail() function appears to be working just fine for me. You may like to check your script against the examples on the wiki. If you are passing data to the mail() function from a form, and you are using PHP 5, make sure you aren’t using any of the deprecated array variables.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

Dreamhost doesn’t seem to require a real email address in my case, but it might validate the domain. I send confirmation emails from "no_reply@mydomain.com", although I use my real domain.

Did you attempt to send to yourself at a DH mailbox for testing? I’ve seen issues regarding “relaying not permitted” but don’t know much about it.

Try sending to a different email, such as gmail or something.

BC Tech
Team Shocker


#4

As suggested, try sending a test message with it to an offsite account and see what happens. I wouldn’t expect the from field to affect it, as that should be in the header, unless it is being blocked as spam. Also, the function returns “true” upon “success.” You can see if it is returning true or false and that can help with the troubleshooting.

Check out Gordaen’s Knowledge, the blog, and the MR2 page.