Forum Moderators: phranque

Message Too Old, No Replies

whose address goes in "reply-to" in php mail() script?

         

zollerwagner

4:00 am on May 19, 2004 (gmt 0)

10+ Year Member



What address should the "reply-to" header of a php mail() script be set to?

In all of my scripts, I've set it so emails sent from the visitor to the site owner had "reply-to" set to the visitor's address. Emails sent from the site owner to the visitor had the owner's address in "reply-to".

One of my Web hosts has told me that if the visitor's email address bounces, then the "reply-to" address is also worthless and the bounce notice goes to the Web server.

The problem of setting all "reply-to" addresses to the Site Owner is that if the site owner hits "Reply" button, they'll be sending an email to themselves. (And anytime a site owner feels stupid, that makes me look bad, so I try to avoid things like that!)

Hmm. Now that I think about it, if the email to the visitor bounces because the visitor's address is bad, the bounce message will go to the site owner. If the email to the site owner bounces, the bounce message would go to the visitor, but this shouldn't happen if I've given the correct address for the site owner. So I don't see any problems.

Am I missing something?

jatar_k

10:32 pm on May 19, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I always set

From:
Return-Path:
Reply-To:

all to the same address

zollerwagner

12:07 am on May 20, 2004 (gmt 0)

10+ Year Member



Thanks for responding, Jatar_K.

Do you sometimes make these addresses the address of the site visitor? Any problems with doing that?

BlueSkyIS

4:12 pm on May 31, 2004 (gmt 0)

10+ Year Member



I have had problems using visitor email addresses in reply-to, from, etc. fields. We have found that many email servers validate the domain for the arriving email; if the From field doesn't match the domain of the sending server, the server won't pass it on. It won't necessarily bounce but will just disappear as spam. Our only solution was to quit allowing the user to use their own email address; we have to use our own to get emails delivered reliably.

-Les

zollerwagner

2:58 am on Jun 1, 2004 (gmt 0)

10+ Year Member



I was worried about that. How did you discover this, by testing?

Thanks!