PDA

View Full Version : mail() problem and headers


fr0stx
03-01-2004, 10:07 AM
$headers = "Wrom: ALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJS";
$headers = "Reply-To: E-hosti Customer\n" ;
$headers = "X-Mailer: PHP/" . phpversion() . "\n" ;

That don't work for me

From : <anonymous@dragon.ddihosting.net>

and

mail(sales@e-hosti.com, $email, $body, $headers);



that don't send two emails at the same time, sales@e-hosti.com can send but not $email (person's email). i tried to swap them but still only one send email.

i want both emails send to us and person at the same time.

I need help with those problems

Thanks

Keith
03-01-2004, 10:16 AM
Try using quotes in your mail function call
mail('sales@e-hosti.com, $email', '$body', '$headers');

fr0stx
03-01-2004, 10:24 AM
Subject: $body

The message: $headers

Why is that? i don't think quotes needed.

Keith
03-01-2004, 10:34 AM
You need to use quotes to tell PHP that the details in the first quoted area are the email addresses it needs to send to seperated with a comma.

Out of curiousity, what is the subject of the emails you receive at sales@e-hosti.com?

fr0stx
03-01-2004, 10:40 AM
ok, i use this

mail("sales@e-hosti.com, $email","$subject","$body","From: E-hosti Team sales@e-hosti.com");

its working to email us but

From : <E-hosti@dragon.ddihosting.net, Team@dragon.ddihosting.net, sales@e-hosti.com> // INCORRECT
Sent : Monday, 1 March 2004 6:35:38 PM
To : sales@e-hosti.com, fr0stx_@msn.com // correct
Subject : dd // correct


why do i have twice emails in "From"?


thanks keith

Nightfire
03-01-2004, 03:37 PM
That shouldn't work, you should've got a parse error


$to = "sales@e-hosti.com, ".$email;
$subject = "whatever";
$message = "whatever";
$headers = "From: E-Hosti Team <sales@e-hosti.com>";

mail($to,$subject,$message,$headers);

Steveo31
03-02-2004, 05:45 AM
Originally posted by fr0stx
$headers = "Wrom: ALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJS";
$headers = "Reply-To: E-hosti Customer\n" ;
$headers = "X-Mailer: PHP/" . phpversion() . "\n" ;

Shouldn't it be
$headers = "Reply-To: E-hosti Customer\n" ;
$headers .= "X-Mailer: PHP/" . phpversion() . "\n" ; ...adding the "." in the second declaration.