Page 1 of 1

doubt regarding mail function: who is the sender?

Posted: Thu Jul 02, 2009 4:15 am
by kvs
Hello there.
i'm using the mail function to send the comments on my website( entered into a text area), to be sent to my email. However, who will actually send the email?
I tried doing this. the mail function returns a true value, but the mail doesn't get sent to my email.
thanks in advance.

Re: doubt regarding mail function: who is the sender?

Posted: Thu Jul 02, 2009 6:40 am
by SeaJones
Mail only works if your server is actually set up to do it. If it's returning true but not arriving, google for info specific to your environment on setting up mail delivery.

Also, just in case, check your spam folders?

Re: doubt regarding mail function: who is the sender?

Posted: Thu Jul 02, 2009 8:37 am
by Eric!
You're sending it to yourself from the person posting it, if they provide an email address. Otherwise send it from yourself.

Improperly formed headers will show success from mail() but will not go anywhere. Also headers missing information, but not enough so they don't get delivered often get filtered by spam filters.

If this form is open to the public, make sure you filter for injection attacks. here are some ideas for filtering viewtopic.php?f=34&t=102450