Re: Mail reply-path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Richard this is exactly what i was after and works perfectly! 

Cheers

Bob

Richard Lynch <ceo@xxxxxxxxx> wrote: On Tue, August 15, 2006 6:54 am, bob pilly wrote:
> Im trying to send emails using the mail() function but im having a
> problem. Because the box that the scripts sit on is a shared
> web-hosting package the Reply-path part of the header always comes up
> as nobody@xxxxxxxxxxxxxxxxxx but i have set the from part of the
> header to automail@xxxxxxxxxxxxx A lot of people are not getting the
> emails (most are) and im picking that its because the domains on the 2
> header parts are different and they have some sort of antispam policy
> which blocks these. Apart from changing the domains or email addresses
> to be the same has anyone seen this problem before and if so can you
> give advice or point me to some relevant docs on it? I have tried to
> change the Replay-path: part of the header with code but it seems to
> default to the above.

The Reply-path: you want to change is not a normal header, so you can
cross off the idea of fixing it with the 4th arg to mail().

If you are using current PHP, there is yet another bonus argument, the
5th one, for this specific purpose, documented in the manual:
http://php.net/mail

If you are NOT using a version of PHP that has that 5th arg, then you
could maybe use ini_set on the sendmail_path to add the -f there. (see
man mail).

That, however, would require that the user PHP runs as, which is what
Apache runs as, be a trusted user in sendmail.cf, which your webhost
may or may not have decided is a Good Idea, based on how much they
trust their clients.

Going farther afield, you could attempt to find an SMTP
host/server/setup that would allow you to set these values to what you
want -- I *think* that's do-able...  I never had to go that far,
personally, so can't be certain.

You may also want to convince the recipients to white-list your
address, so that the From/Reply-path/etc are all irrelevant for spam
filtering.  This has the advantage of being a long-term solution, for
any reasonable implementation of spam-filtering that allows
whitelisting by the recipient, no matter what spam-filtering "rules"
are brought to bear in the future.

-- 
Like Music?
http://l-i-e.com/artists.htm




 		
---------------------------------
 All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux