I am trying to write codes to accept feedback form, which suppose to send the message to my e-mail address. The following is the action codes (send_mail.php) form after you press submit:
Code: Select all
<title>Send Email</title>
</head>
<body>
// send mail code
$nama=$_GET["nama"];
$email=$_GET["email"];
$message=$_GET["message"];
// akhir hapus blok
Nama : <?echo $nama;?><br>
email : <?echo $email;?><br>
message : <?echo $message;?><br>
<?
ini_set("SMTP", "172.16.1.1");
ini_set("sendmail_from", "$nama");
mail("$nama", "$email", "$message");
?>
Telah di kirim!
</body>
</html>
The following errors appears :
// send mail code $nama=$_GET["nama"]; $email=$_GET["email"]; $message=$_GET["message"]; // akhir hapus blok Nama :
Notice: Undefined variable: nama in C:\xampp\htdocs\webproject\send_email.php on line 16
email :
Notice: Undefined variable: email in C:\xampp\htdocs\webproject\send_email.php on line 17
message :
Notice: Undefined variable: message in C:\xampp\htdocs\webproject\send_email.php on line 18
Notice: Undefined variable: nama in C:\xampp\htdocs\webproject\send_email.php on line 22
Notice: Undefined variable: nama in C:\xampp\htdocs\webproject\send_email.php on line 23
Notice: Undefined variable: email in C:\xampp\htdocs\webproject\send_email.php on line 23
Notice: Undefined variable: message in C:\xampp\htdocs\webproject\send_email.php on line 23
Warning: mail() [function.mail]: Failed to connect to mailserver at "172.16.1.1" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\webproject\send_email.php on line 23
Telah di kirim!
What might be the problem?
Please help. thanks.