Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Return Mail Value

Status
Not open for further replies.

wuz

Programmer
Jul 10, 2000
18
0
0
US
Does anyone know how to return emails to the sender if the email addresses are incorrect?

I have a newsletter script that includes:

mail("$Email", "$Subject", "$MessageStr", "From: $FromEmail\r\nReply-To: $FromEmail\r\nReturn-Path: $FromEmail");

in a loop, where the values are pulled from a form and sent to subscribers. The emails are going out, but any invalid or old email addresses are not bouncing back to the $FromEmail address. I thought that's what Return-Path did. Any ideas where the invalid emails are going, and how to get the bad email addresses?

Thanks,
Susan :)
 
Well, Return-Path is the correct method, but you can also modify your php.ini file as follows:

sendmail -t -f errors@mydomain.com

Of course you have to apply a static address, but at least it should work.

Chad. ICQ: 54380631
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top