RE: [PHP] Getting the "From: admin@site.com" to work

From: Date: Sat, 26 Oct 2002 20:42:46 +0000
Subject: RE: [PHP] Getting the "From: admin@site.com" to work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121547@lists.php.net to get a copy of this message
[snip] > if(@mail($to, $from, $subject, $message)) Go back to the manual. The parameters for mail are mail(to,subject,message,headers). You have to pass the From: address in the headers. $to = "you@domain.com"; $subject = "Your email"; $message = "Your email is good"; $headers = "From: john@mydomain.com\r\n"; mail($to,$subject,$message,$headers); Read the manual on other headers you can send. ---John Holmes...

« previous php.general (#121547) next »