Hi
My site offers news stories.
I am attempting to implement a "email a friend this article" feature allowing someone to email the link to a particular news item to a friend.
This works fine
However what I would like the sent email to do is have the users name or email address in the "from" field rather than my postmaster address. I have the users email address and name in variables.
Does anyone know how to achieve this?
Thanks in advance
adding a name to the mail function when sending an email
Moderator: General Moderators
You would set your from header to the senders email address.
Code: Select all
$headers = 'FROM: '.$usersemail."\r\n";
mail($to,$subject,$body,$headers);Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.