Hi,
I have joined Infinity Free a few hrs ago, very excited to bring over a site I have been working on. I was asked to do a contact page but I am stumped trying to get the php mailer to work. Any help with a setup guide would be appreciated for this server.
Site: http://my80stoys.rf.gd/
I currently have a contact form template as the index file, when I add the values it all says email sent, but I receive no emails. I know very little about php.
Any help is much appreciated. Thankyou.
My php code is below.
// Enter the email where you want to receive the message
$emailTo = '********@hotmail.com';
$clientEmail = addslashes(trim($_POST['email']));
$subject = addslashes(trim($_POST['subject']));
$message = addslashes(trim($_POST['message']));
$antispam = addslashes(trim($_POST['antispam']));
$array = array('emailMessage' => '', 'subjectMessage' => '', 'messageMessage' => '', 'antispamMessage' => '');
if(!isEmail($clientEmail)) {
$array['emailMessage'] = 'Invalid email!';
}
if($subject == '') {
$array['subjectMessage'] = 'Empty subject!';
}
if($message == '') {
$array['messageMessage'] = 'Empty message!';
}
if($antispam != '12') {
$array['antispamMessage'] = 'Wrong antispam answer!';
}
if(isEmail($clientEmail) && $subject != '' && $message != '' && $antispam == '12') {
// Send email
$headers = "From: " . $clientEmail . " <" . $clientEmail . ">" . "\\r\
" . “Reply-To: " . $clientEmail;
mail($emailTo, $subject . " (bootstrap contact form tutorial)”, $message, $headers);
}
echo json_encode($array);