Forum Moderators: coopster

Message Too Old, No Replies

PHP mail()

Where are my bounces?

         

Birdman

11:49 am on Mar 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello,

This is driving me crazy for hours now.

When I send email using mail(), I cannot find the bounces. I need to route the bounces a certain way in order to track them and follow up.

I've tried many headers and such but can never find the bounce.

Any ideas?

Thanks,
Marty

Birdman

12:13 pm on Mar 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, cancel that...it is working now? I just used the 5th parameter, which I already tried before but I had extra headers too. Maybe the headers were messing it up.?

mail($to, $subject,$body,'From: me@me.com', '-f me@me.com')

[edited by: Birdman at 12:14 pm (utc) on Mar. 30, 2007]

coopster

3:00 pm on Mar 31, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I'm guessing you were missing a "return-path" header as required by RFC2821. From Section 4.4:

When the delivery SMTP server makes the "final delivery" of a message, it inserts a return-path line at the beginning of the mail data. This use of return-path is required; mail systems MUST support it.

I once had a case where the mail was undelivered for this very same issue, there was no "Return-Path" header. The mail wasn't even getting to a spam mailbox. And, of course, since there was no "Return-Path", I never found out about it except that I knew I should have been receiving them! Some investigation on the sending server will turn up answers. And yes, the -f switch is a good idea, especially on shared servers.