Now, there is one problem. There is no error message:
Your message has been sent, we will get back to your shortly.
PLEASE COMPLETE THE FOLLOWING REGISTRATION PROGRESS!
An email has been sent to your inbox. Please check your email to continue.
registration2.php
<!DOCTYPE html>
<html lang="en">
<head>
<title>Registration</title>
<meta charset="utf-8">
<meta name="description" content="Your description">
<meta name="keywords" content="Your keywords">
<meta name="author" content="Your name">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/script.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#login").click(function() {
$(".login_box").slideToggle('fast');
});
});
</script>
<script type="text/javascript">
function myFunction()
{
document.getElementById('login_box').style.display='none';
}
</script>
<!--[if lt IE 8]>
<div style=' clear: both; text-align:center; position: relative;'>
<a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
<img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
</a>
</div>
<![endif]-->
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<link rel="stylesheet" href="css/ie.css">
<![endif]-->
</head>
<body>
<?php include('menu.php'); ?>
<div class="bg-main" onClick="myFunctionDisplayNone()">
<header>
<div class="container_24">
<div class="wrapper">
<br><br>
</div><br><br>
<?php
include('includes/koneksi.php');
// PHP Mailer
require $_SERVER['DOCUMENT_ROOT'] . '/phpmailer/PHPMailerAutoload.php'; //memanggil library php mailernya
function smtpmailer($to, $from, $from_name, $subject, $body) {
global $error;
$mail = new PHPMailer();
$mail->AuthType = 'NTLM';
$mail->IsSMTP();
$mail->SMTPDebug = 2; // untuk memunculkan pesan error /debug di layar
$mail->SMTPAuth = true; // authentifikasi smtp enable atau disable
$mail->SMTPSecure = "";//‘ssl atau di kosongkas jika none’; // secure transfer membutuhkan authentifikasi dari mail server
$mail->Host ="smtp.indonusa.net.id"; // masukkan nama host email “diawal ssl://”
$mail->Port = 25; //port secure ssl email
$mail->Username = "davy@indonusa.net.id"; //username email
$mail->Password = "*********"; //password email
$mail->SetFrom($from, $from_name);
$mail->Subject = $subject;
$mail->Body = $body;
$mail->AddAddress($to);
if(!$mail->Send()) {
$error = "Mail error: ".$mail->ErrorInfo;
return false;
} else {
$error = "Message sent!";
return true;
}
}
// write program to send email to the recorded email address
/*
require_once('recaptchalib.php');
$name = strip_tags(@$_POST['name']);
$email = str_replace(" ", "", strip_tags(@$_POST['email']));
$phone = str_replace(" ", "", strip_tags(@$_POST['phone']));
$message = strip_tags(@$_POST['message']); */
$name = "John";
$email = "davy@indonusa.net.id";
$phone = "8888888";
$message = "message";
/*if (@$_POST['submit']) {*/
if ($name&&$email&&$phone&&$message) {
if (is_numeric($phone)) {
/*$privatekey = "6LfjvdcSAAAAAHNcKjYO5DhTNefxYZHYcfhtrvGC";
$resp = recaptcha_check_answer($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
//What happens when the CAPTCHA was entered incorrectly
echo "The reCAPTCHA wasn't entered correctly.";
} else { */
//Your code here to handle a successful verification
ini_set("SMTP", "smtp.indonusa.net.id");
$body = "
Name: ".$name."
Phone: ".$phone."
Email: ".$email."\n\n
".$message;
//mail("davy@indonusa.net.id", "Message from Innovation Website", $body, "From: ".$email
smtpmailer("davy@indonusa.net.id", "davy@indonusa.net.id", "Davy", "Test Email", $body); // script kirim email
echo "Your message has been sent, we will get back to your shortly.";
$name = trim("");
$email = trim("");
$phone = trim("");
$message = trim("");
}
}
else
echo "There should only be numbers in your phone number.";
/*} */
/*else
echo "Please fill in <b>all</b> the fields!";
} */
?>
<h3>PLEASE COMPLETE THE FOLLOWING REGISTRATION PROGRESS!</h3><br><br>
<form id="registration-form">
<table style="width: 1000px">
<img src="images/registrationbar2.png" height="70px" width="850px"><br><br><br>
<tr>
<img src="images/email.png" width="50px"> An email has been sent to your inbox. Please check your email to continue.<br><br><br>
</tr>
</table>
</form>
</div>
<?php include('footer.php'); ?>
</body>
</html>
Yet, whenever I check my email I do not receive any email! I wonder why?