Frank S.
|
| Posted: 03/15/2002, 2:56 PM |
|
Hi all,
Trying to modify the "Tell A Friend". I have been successful in making it
all work except for inserting the "from_email" field into the DB and having
it show as the sender in the e-mail. In the DB the field "from_email"
remains blank while the "from" area of the sent e-mail is sent from "httpd".
Here's the code:
$to_email = get_param("to_email") . "," ;
$to = "Mike and Charlene<michael09@xyz.net>";
$from_email = get_param("from_email");
$subject = "Vehicle Move Request from " . get_param("from_name");
$body = "Hello " . get_param("to_name") . "!" . chr(13) .
chr(13) . get_param("from_name") .
" sent you this page from the xyz Web Site." . chr(13) .
"http://www.xyz.com" . chr(13) . chr(13) . "Special Instructions from " .
get_param("from_name") . ":" . chr(13) . get_param("message_comments") .
chr(13)
.. chr(13) . "Pickup Date" . ": " . get_param("pickup_date")
.. chr(13) . "Vehicle Year" . ": " . get_param("vehicle_year")
.. chr(13) . "Vehicle Make" . ": " . get_param("vehicle_make")
.. chr(13) . "Vehicle Model" . ": " . get_param("vehicle_model")
.. chr(13) . "Pickup City" . ": " . get_param("pickup_city")
.. chr(13) . "Pickup State" . ": " . get_param("pickup_state")
.. chr(13) . "Deliver To City" . ": " . get_param("delivery_city")
.. chr(13) . "Deliver To State" . ": " . get_param("delivery_state");
$db->query("insert into tellafriend_log (sending_date, from_email,
from_name, to_email, to_name, pickup_date, vehicle_year, vehicle_make,
vehicle_model, pickup_city, pickup_state, delivery_city, delivery_state,
message_comments) values (" .
tosql(date("Y-m-d G:i:s"), "Text") . "," .
tosql(get_param("from_email"),"Text") . "," .
tosql(get_param("from_name"),"Text") . "," .
tosql(get_param("to_email"),"Text") . "," .
tosql(get_param("to_name"),"Text") . "," .
tosql(get_param("pickup_date"),"Text") . "," .
tosql(get_param("vehicle_year"),"Text") . "," .
tosql(get_param("vehicle_make"),"Text") . "," .
tosql(get_param("vehicle_model"),"Text") . "," .
tosql(get_param("pickup_city"),"Text") . "," .
tosql(get_param("pickup_state"),"Text") . "," .
tosql(get_param("delivery_city"),"Text") . "," .
tosql(get_param("delivery_state"),"Text") . "," .
tosql(get_param("message_comments"),"Text") . ")");
mail($to_email, $to, $subject, $body,"From: $from_email\nReply-To:
$from_email\nX-Mailer: PHP/" . phpversion());
If anyone has any ideas, please feel free!
thanks in advance,
Frank
Copy this code and use it!
|
|
|
 |
Dave Heller
|
| Posted: 03/15/2002, 5:56 PM |
|
I recently had the same problem
PHP does not like a carriage return on the From: entry
Dave Heller
"Frank S." <fsurget@auuooh.com> wrote in message
news:a6tu7j$lqs$1@news.codecharge.com...
> Hi all,
> Trying to modify the "Tell A Friend". I have been successful in making it
> all work except for inserting the "from_email" field into the DB and
having
> it show as the sender in the e-mail. In the DB the field "from_email"
> remains blank while the "from" area of the sent e-mail is sent from
"httpd".
> Here's the code:
>
> $to_email = get_param("to_email") . "," ;
> $to = "Mike and Charlene<michael09@xyz.net>";
> $from_email = get_param("from_email");
> $subject = "Vehicle Move Request from " . get_param("from_name");
>
> $body = "Hello " . get_param("to_name") . "!" . chr(13) .
> chr(13) . get_param("from_name") .
> " sent you this page from the xyz Web Site." . chr(13) .
> "http://www.xyz.com" . chr(13) . chr(13) . "Special Instructions from " .
> get_param("from_name") . ":" . chr(13) . get_param("message_comments") .
> chr(13)
> . chr(13) . "Pickup Date" . ": " . get_param("pickup_date")
> . chr(13) . "Vehicle Year" . ": " . get_param("vehicle_year")
> . chr(13) . "Vehicle Make" . ": " . get_param("vehicle_make")
> . chr(13) . "Vehicle Model" . ": " . get_param("vehicle_model")
> . chr(13) . "Pickup City" . ": " . get_param("pickup_city")
> . chr(13) . "Pickup State" . ": " . get_param("pickup_state")
> . chr(13) . "Deliver To City" . ": " . get_param("delivery_city")
> . chr(13) . "Deliver To State" . ": " . get_param("delivery_state");
>
>
>
> $db->query("insert into tellafriend_log (sending_date, from_email,
> from_name, to_email, to_name, pickup_date, vehicle_year, vehicle_make,
> vehicle_model, pickup_city, pickup_state, delivery_city, delivery_state,
> message_comments) values (" .
> tosql(date("Y-m-d G:i:s"), "Text") . "," .
> tosql(get_param("from_email"),"Text") . "," .
> tosql(get_param("from_name"),"Text") . "," .
> tosql(get_param("to_email"),"Text") . "," .
> tosql(get_param("to_name"),"Text") . "," .
> tosql(get_param("pickup_date"),"Text") . "," .
> tosql(get_param("vehicle_year"),"Text") . "," .
> tosql(get_param("vehicle_make"),"Text") . "," .
> tosql(get_param("vehicle_model"),"Text") . "," .
> tosql(get_param("pickup_city"),"Text") . "," .
> tosql(get_param("pickup_state"),"Text") . "," .
> tosql(get_param("delivery_city"),"Text") . "," .
> tosql(get_param("delivery_state"),"Text") . "," .
> tosql(get_param("message_comments"),"Text") . ")");
>
> mail($to_email, $to, $subject, $body,"From: $from_email\nReply-To:
> $from_email\nX-Mailer: PHP/" . phpversion());
>
> If anyone has any ideas, please feel free!
> thanks in advance,
> Frank
>
> Copy this code and use it!
>
>
|
|
|
 |
Frank S.
|
| Posted: 03/15/2002, 6:29 PM |
|
Thanks, Dave
I'll give it a try. Which carriage return?
Frank
|
|
|
 |
Dave Heller
|
| Posted: 03/15/2002, 6:41 PM |
|
the C style returns --- \n
Dave
"Frank S." <fsurget@auuooh.com> wrote in message
news:a6uan1$c58$1@news.codecharge.com...
> Thanks, Dave
> I'll give it a try. Which carriage return?
> Frank
>
>
|
|
|
 |
|