PDA

View Full Version : mail function - from...



harrylmh
December 3rd, 2001, 09:53
Hi!
I tried using php's mail function like this:
mail($email,$subject,$message,$subject);

It does email but when I check the 'From:' from the email in my email client, it says the server email. How I change this?

Thanks!

Beans
December 3rd, 2001, 20:06
Originally posted by harrylmh
Hi!
I tried using php's mail function like this:
mail($email,$subject,$message,$subject);

It does email but when I check the 'From:' from the email in my email client, it says the server email. How I change this?

Thanks!



$additionalheaders = "From:$email\nReply-to:$email";
mail("<Recipient>".$email,$subject,$message,$additionalheader);

harrylmh
December 4th, 2001, 07:44
Thank you!