mail function and bounced messages

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
oboedrew
Forum Commoner
Posts: 78
Joined: Fri Feb 20, 2009 1:17 pm

mail function and bounced messages

Post by oboedrew »

If a message is sent via php's mail function and it bounces, will the bounce notification be sent to the address in the "from" header? Or is there something else I must do to ensure bounces end up in my inbox?

Thanks,
Drew
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: mail function and bounced messages

Post by requinix »

oboedrew wrote:If a message is sent via php's mail function and it bounces, will the bounce notification be sent to the address in the "from" header? Or is there something else I must do to ensure bounces end up in my inbox?
It will go back to the From address... unless you give a Reply To, then it might go to that instead. Not sure about that.
oboedrew
Forum Commoner
Posts: 78
Joined: Fri Feb 20, 2009 1:17 pm

Re: mail function and bounced messages

Post by oboedrew »

I'm not sure this is correct. I've been testing it the past few days, sending test messages via php's mail function to addresses that do not exist, and I'm not getting any of them bounced back to the "From:" address. Anyone have other ideas for ensuring these bounced messages make their way back to me? Or are there any circumstances that will cause bounced message not to end up at the "From:" address?

Thanks,
Drew
oboedrew
Forum Commoner
Posts: 78
Joined: Fri Feb 20, 2009 1:17 pm

Re: mail function and bounced messages

Post by oboedrew »

Nevermind. Found a solution. It seems a fifth parameter "-f$my_email" is needed. Then I receive the bounce notices.

Cheers,
Drew
Post Reply