Re: Defining the Return-Path in an email header?

From: Date: Thu, 10 May 2001 15:40:42 +0000
Subject: Re: Defining the Return-Path in an email header?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-52305@lists.php.net to get a copy of this message
Previously, Kevin Price-Ward said: > > I am setting up a php emailer facility using the 'mail' function, I have > defined the 'Return-Path:' in the fourth argument of 'mail', but this keeps > getting overwritten by sendmail: > > my code says: > $headers .= "Return-Path: <accounts@talismanmarketing.co.uk>\n"; > > but the source on the resulting email says: > Return-Path: <nobody@vweb9.hiway.co.uk> > > (Where vweb9.hiway.co.uk is our ISP's server) > > the problem with this is that emails that might have delivery problems, > don't get returned to me and I will never know that they haven't been > delivered. Return-Path can't be reliably set on the source system; it is commonly set by the destination system using the value from MAIL FROM obtained during the SMTP transaction. You may be better off not using mail() and instead exec'ing a copy of sendmail (or equivalent) with the "-f" flag (or equivalent). Such as: sendmail -faccounts@talismanmarketing.co.uk You can do this in a few different ways, but it's not any different than opening any other process and piping data to it. -dan -- If the police arrest a mime, do they tell him he has the right to remain silent? -George Carlin

« previous php.general (#52305) next »