View unanswered posts | View active topics It is currently Thu Dec 14, 2017 12:25 pm



Reply to topic  [ 2 posts ] 
 send mail problems 
Author Message
Junior Member

Joined: Wed Oct 20, 2004 8:09 pm
Posts: 2
Post 
I've tried to put the sendfrom email = bookings@domain.com as well but it is being overridden by the client login and domain name.

What I'd like is for the person who's entered their email address to be the address used in the 'sendfrom'. Any help would be much appreciated.

Thanks


<?php session_start(); ?>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache"); // HTTP/1.0

?>
<?php
ob_start();
//get action

$a = @$HTTP_POST_VARS["a"];

if (empty($a))

{

$a = "I"; //display with input box

}

$x_Name = @$HTTP_POST_VARS["NAME"];
$x_Email = @$HTTP_POST_VARS["EMAIL"];
$x_Phone = @$HTTP_POST_VARS["PHONE"];
$x_Details = @$HTTP_POST_VARS["DETAILS"];

switch ($a)

{

case "I": // Get a record to display

break;



case "E": // Update



// Send info to Site Administrator

ini_set("sendmail_from",@$HTTP_POST_VARS["EMAIL"]);

ini_set('SMTP', "LOCALHOST");


$message = "Booking Enquiry: \n------------------------\n";



$message .=str_pad("Name", 30)."\t".$x_Name."\n";

$message .=str_pad("Phone", 30)."\t".$x_Phone."\n";

$message .=str_pad("Email", 30)."\t".$x_Email."\n\n";



$message .=$x_Details."\n";

$email = "me@mywebsite.com";

mail($email, "Booking Enquiry", $message);

header("Location: thanks.htm");

break;

}



?>


Wed Oct 20, 2004 8:16 pm
Report this post
Profile
Junior Member

Joined: Thu Nov 04, 2004 4:38 am
Posts: 1
Post 
Hi,

$headers="from :bookings@domain.com";

mail($email, "Booking Enquiry", $message,$headers);


Thu Nov 04, 2004 4:52 am
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.