doubt regarding mail function: who is the sender?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kvs
Forum Newbie
Posts: 1
Joined: Thu Jul 02, 2009 4:12 am

doubt regarding mail function: who is the sender?

Post 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.
SeaJones
Forum Commoner
Posts: 48
Joined: Tue Jun 30, 2009 5:40 pm

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

Post 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?
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

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

Post 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
Post Reply