Jump to content

email..cont.


ultratek

Recommended Posts

I do not see what is wrong with what i have...

i have read over that mail manual page people are posting me several times...

this is what i came up with which what got rid of the  500 error but still not recieving email:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Processing</title>
</head>

<body>
<?php
$name = $_REQUEST['name'];
$phone = $_REQUEST['phone'];
$email = $_REQUEST['email'];
$subject = $_REQUEST['subject'];
$comments = $_REQUEST['comments'];

$name = "name"; //senders name
$email = "email"; //senders e-mail adress
$recipient = "[email protected]"; //recipient
$comments = "comments...\n\n".$phone;
$subject = "subject"; //subject
$header = "From: ". $name . " <" . $email . ">\r\n"; //optional headerfields

mail($recipient, $subject, $comments, $header); //mail command 
?>
</body>
</html>

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

I'll be back in town on Sunday evening and will be glad to give you a hand w/ the problem.  In fact it's coincidence that I am going to be installing a mail script for myself sunday evening for a campaign that I'll be running on mon & tues for a client.  If you like I can assist you in using whatever script I find most useful and most cross-platform friendly.

Link to comment
https://forums.phpfreaks.com/topic/125728-emailcont/#findComment-651695
Share on other sites

well tech support got back with me from my hosting service provider and they gave me the ini_set line i needed to make the mail work...

 

so everything is working now...just i need to enhance the script for validations which i will try to gather from my php book

thank you for your help

 

here is the latest code if you are curious:

<?php
ini_set("SMTP","bosmail.nt.com");
$name = $_POST['name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$comments = $_POST['comments'];

$name = $name; //senders name
$email = $email; //senders e-mail adress
//$recipient = "[email protected]"; //recipient
$recipient = "[email protected]"; //recipient
//$recipient = "[email protected]"; //recipient

$comments = "$comments...\n\n".$phone;
$subject = $subject; //subject
$header = "From: ". $name . " <" . $email . ">\r\n"; //optional headerfields

mail($recipient, $subject, $comments, $header); //mail command 

echo "Mail has been sent succesfully";
?>

Link to comment
https://forums.phpfreaks.com/topic/125728-emailcont/#findComment-652022
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.