I have a mail function with the standard parameters:
mail($to, $subject, $message, $headers);
Where:
$headers = "From: admin@mysite.org";
$headers .= "
Content-Type: multipart/alternative; boundary=\"PHP-alt-".$random_hash."\"";
Now, I'm trying to get the sent e-mails to show 'My Site' as the sender instead of 'admin@mysite.org' but if someone responds to the mail it still needs to go to admin@mysite.org.
I've tried putting "My Site" in the "From" field before and after the e-mail address but it just appends to the address. I've tried appending it to the $headers variable but that messes the whole e-mail up. I've also tried adding it this way:
$headers .= "
My Site";
but that doesn't seem to do anything.
I know this can't be complicated as I've seen it done a hundred times, but I can't seem to find a straight-forward answer for this - how do I 'mask' the admin e-mail with the site name but still keep it as the address any response goes to?