Jump to content

Sending Mail with PHP


stunnedhippo

Recommended Posts

I have been trying to figure out what is wrong with this script for ages and I am beggining to give up on it.  I really need some help on what is wrong with my script.

 

All I want to do is send an email through the site to an email address.

The email send, but the details in which the user inputs are missing.  I dont think the variables are right in the script.

 

Please please please help me

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/165473-sending-mail-with-php/
Share on other sites

<?PHP

 

$to = "[email protected]";

$subject = "Online Quotation Request";

$message = "Name:".$theName;

$message .= "\nNumber:".$theNumber;

$message .= "\nEmail:".$theEmail;

$message .= "\n\nMessage:".$theMessage;

$headers = "From: $theEmail";

$headers .= "\nReply-To: $theEmail";

 

$sentOk = mail($to,$subject,$message,$headers);

 

echo "sentOk=" . $sentOk;

 

 

?>

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.