View unanswered posts | View active topics It is currently Sat Mar 17, 2018 11:29 am

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

Joined: Wed Oct 20, 2004 8:09 pm
Posts: 2
I've tried to put the sendfrom email = 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.


<?php session_start(); ?>
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

//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


case "E": // Update

// Send info to Site Administrator


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 = "";

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

header("Location: thanks.htm");




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

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


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

Thu Nov 04, 2004 4:52 am
Report this post
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:  
© Copyright 2003-2008 The ultimate PHP Editor and PHP IDE site.