[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] PHP/sending mail from address
- Subject: Re: [cobalt-users] PHP/sending mail from address
- From: "Mark S Burgunder" <maillist-raq@xxxxxxxxxx>
- Date: Thu Sep 18 14:03:01 2003
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
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