At 11:06 AM -0400 8/15/06, Jon Anderson wrote:
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.
I think you're looking for the 'Return-Path' header rather than the
reply-path. (Or perhaps even Reply-To?)
This works for me (use your own name and domain): :-)
$to = "tedd@xxxxxxxxxxxxxx";
$re = "Subject";
$msg = "Message\n";
$headers = "Return-path: <tedd@xxxxxxxxxxxxxx>\r\n";
$headers .= "From: tedd <tedd@xxxxxxxxxxxxxx>\r\n";
$param5 = '-ftedd@' . $_SERVER['SERVER_NAME'];
mail ($to, $re, $msg, $headers, $param5);
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php