Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Proper way to send mail
- Lorenzo Thurman
August 25, 2005, 3:10 pm
rate this thread
mail() function, but I can't set the Reply-To address using it. Or can
I? So I've been using sendmail instead, but I can't seem to figure out
how to get the username in the header. Something like this:
<first last> email@example.com
Escaping the '<>' is the problem. Also, I'd like to know how to validate
the input as this info will come from a web based form on my site and I
want to avoid the spammers.
Re: Proper way to send mail
Yes, you can. The mail() docs give examples.
Almost. The greater-/less-than signs bracket the address and
not the name. So, for example, to set a single name-addr in
the Reply-To header:
It's covered in RFC2822 sec. 3.6.2: