Page 1 of 1

how do i change what is displayed in the "from" email field

Posted: Tue Jun 10, 2008 11:31 am
by arcmedia
Hey guys I'm new to this great community and tried to do research on this prior to posting here. I actually called ipower support cause i thought it was server issue and tech support told me to "google it."

I've developed a flash form that works with php to do a simple send to a friend or mailing sign up form that would then be emailed to the user inputed information. My issue is that when the user receives the resulting email it will come from an undesired email alias that is not related to my domain. Has anyone experienced this issue? and how could i go about controlling what the "from" field displays?

Thanks in advance!

example of my "send to a friend" php script below being called from flash.

Code: Select all

 
<?
$msg = "Hey, check out myurl.com.";
$to = "$sender_email";
$subject = "$sender_name has recommended a site for you.\n\n ";
$mailheaders = "Sent from myurl.com \n";
mail($to, $subject, $msg, $mailheaders);
?>
 

Re: how do i change what is displayed in the "from" email field

Posted: Tue Jun 10, 2008 12:30 pm
by superdezign
I believe that 'Sender' and 'Reply-To' would be the mail headers that you would be interested in. Maybe checking the PHP documentation of the mail() function will prove useful in showing you how to use headers.

Re: how do i change what is displayed in the "from" email field

Posted: Wed Jun 11, 2008 12:23 pm
by arcmedia
cool thanks for the tip :D