[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] PHP/sending mail from address



oxfordmusic.net said:
> i've been struggling with one of my scripts when sending email out from a
> php script.
> the problem is that the From address always comes out as httpd whereas i
> want to specify a From address.
> i figured out that i can use the "-f" switch when sending the mail like
> this
> but now i'm getting the following log error:

I am using the following code to set the from address successfully in PHP:

   $EmailBody .= "subscribe list " . $email;

   $EmailSubject = "Subscription to Mailing List ";

   $EmailAddHdr = "From: " . $email;

   mail ("listar@xxxxxxxxxxxxxxxxx", $EmailSubject, $EmailBody,
$EmailAddHdr);

Hope this helps.

Cheers
Mark S Burgunder