|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I'm having a mismatch in the Email being rec'd and the code generating it.
The mail always comes in as From: anonymous@ip-XXX-XXX-XXX-XXX.ip.myhostcompany.net, and the "From" address input on the mail form appears in the body of the mail message. Here's the code: if ($All=="1") { $headers .= "From: $FROM <$FROM>\n"; $headers .= "X-Sender: <$FROM>\n"; $headers .= "X-MSMail-Priority: Normal\n"; $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal $headers .= "Return-Path: <$FROM>\n"; //Uncomment this to send html format $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; $query="SELECT email from tblPhotographers WHERE email !=''"; $result=mysql_query($query) or die(mysql_error("Could not execute query.")); while($row = mysql_fetch_array($result)) { $email = $row['email']; $email = rtrim($email); $to = $email; mail($to, $subject, $message, $headers); echo "Your Email has been sent to: ".$to . "<BR>"; } //end while($row = mysql_fetch_array($result)) } //end if($All=="1") The mail coming in though, looks like this - and I can't figure out why things aren't lining up. customeremail@msn.com The following information has been submitted from the website: FROM: Jennifer Smith EMAIL: customeremail@msn.com WEBSITE: MESSAGE: Miscellaneous text here. Does anyone see anything that I'm missing, presumably in my headers??? Thanx, Wm |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Anyone...???
"Shooter" <SDshooter@hotmail.com> wrote in message news:47ccd2d2$0$24097$4c368faf@roadrunner.com... > I'm having a mismatch in the Email being rec'd and the code generating it. > The mail always comes in as > From: anonymous@ip-XXX-XXX-XXX-XXX.ip.myhostcompany.net, and the "From" > address input on the mail form appears in the body of the mail message. > Here's the code: > > if ($All=="1") { > $headers .= "From: $FROM <$FROM>\n"; > $headers .= "X-Sender: <$FROM>\n"; > $headers .= "X-MSMail-Priority: Normal\n"; > $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal > $headers .= "Return-Path: <$FROM>\n"; > //Uncomment this to send html format > $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; > $query="SELECT email from tblPhotographers > WHERE email !=''"; > $result=mysql_query($query) or die(mysql_error("Could not execute > query.")); > while($row = mysql_fetch_array($result)) { > $email = $row['email']; > $email = rtrim($email); > $to = $email; > mail($to, $subject, $message, $headers); > echo "Your Email has been sent to: ".$to . "<BR>"; > } //end while($row = mysql_fetch_array($result)) > } //end if($All=="1") > > The mail coming in though, looks like this - and I can't figure out why > things aren't lining up. > > customeremail@msn.com > The following information has been submitted from the website: > FROM: Jennifer Smith > EMAIL: customeremail@msn.com > WEBSITE: > MESSAGE: Miscellaneous text here. > > > Does anyone see anything that I'm missing, presumably in my headers??? > > Thanx, > Wm > > > > |
|
![]() |
| Outils de la discussion | |
|
|