Jump to content

mail


odium

Recommended Posts

Hi, I am new to php and would like to know if anyone can help me.  I have created a simple mail form and wants the clients to receive a mail after they have submitted the request, query...  The code is shown below, what is missing???

<?php
extract($_POST);

$ToEmail = "$email";
$ToMe = "[email protected]";
$ToSubject = "webmaster";
$FirstName = "site";
                               
$EmailBody = "Name:           $name\nSurname:        $surname\nE-mail:         $email\nCompany Name:   $company\nContact Number: $contact\nMessage:  \n\n$message \n";

$EmailFooter="\nThis message was sent by: $FirstName from $REMOTE_ADDR . \nIf you feel that you recieved this e-mail by accident please contact us at [email protected] \n";

$Message = $EmailBody.$EmailFooter;

$mailheaders = "From: $ToEmail \n";
$mailheaders .= "Reply-To: $ToEmail \n";


mail($ToMe,"webmaster", $Message, $mailheaders);


header("Location: mailmsg.html");
?>

Link to comment
https://forums.phpfreaks.com/topic/134612-mail/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.