Hi All,
I am in dire need of help!! I am trying to use this contact form http://www.jbbarry.ie/jbb/contact.html (which works perfectly on a testing server) but will not work on the company domain. It uses a PHP mailer, which apparently my web host has disabled due to spam? So I need to make my PHP mailer work with SMTP.
Below is the form code:
<div id="brochure">
Request a Company Brochure.
<form action="mailer.php" method="post">
<fieldset>
<input type="text" name="name" value="Name…" onfocus="this.value=(this.value=='Name…')? '' : this.value ;" />
<input type="text" name="email" value="Email…" onfocus="this.value=(this.value=='Email…')? '' : this.value ;" />
<input type="submit" name="submit" class="button" id="submit_btn" value="Submit →"/>
</fieldset>
</form>
And below is the PHP script mailer.php, can anyone help me out and explain how to change it into smtp authentication?
<?php
if(isset($_POST['submit'])) {
$to = "peteomoore@gmail.com";
$subject = "Brochure Request";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
mail($to, $subject, $body);
header('Location: brochure-request.html');
} else{
echo "test!";
}
?>
Thanks in advance for any help you can give me....