superslurpee
Programmer
- May 15, 2002
- 108
Hi,
In sending an email using the email function, I've got the email address as both the first parameter:
and as
to get the name in there. When the email arrives, it has the address duplicated in the 'To' field such as:
.
I know that if I take out the first parameter in the mail function and leave the where it's going to the headers it works fine. I've read that you must have that first parameter for certain email programs. The often mentioned tutorial at sitepoint includes the address in both the first mail function parameter and in the headers:
What should I be doing here?
Thanks!
In sending an email using the email function, I've got the email address as both the first parameter:
Code:
mail('email@email.com',...)
Code:
$headers .= "To: $email_to_name <$email_to>\n";
Code:
To: email@email.com, Name <email@email.com>
I know that if I take out the first parameter in the mail function and leave the where it's going to the headers it works fine. I've read that you must have that first parameter for certain email programs. The often mentioned tutorial at sitepoint includes the address in both the first mail function parameter and in the headers:
What should I be doing here?
Thanks!