Mailer.php problems

Hey, I have been looking through this forum for ages and I can’t figure out how to fix my problem :confused:

My html is:

<form id=“form” action=“templates/pinkmelody/html/mailer.php” method=“POST”>
<p><label for=“name”>Name</label><br /> <input id=“name” name=“name” type=“text” /></p>
<p><label for=“subject”>Subject</label><br /><input id=“subject” name=“subject” type=“text” /></p>
<p><label for=“email”>Email Address</label><br /><input id=“email” name=“email” type=“text” /></p>
<p><label for=“textarea”>Message</label><br /><textarea name=“textarea”></textarea></p>
<p><input id=“submit” name=“submit” type=“submit” value=“submit” /></p>
</form>

My php is:

<?php

if(isset($_POST[‘submit’])) {

$to = "pink.melody@rocketmail.com";
$subject = $_POST[‘subject’];
$name = $_POST[‘name’];
$email = $_POST[‘email’];
$message = $_POST[‘textarea’];

$body = "From: $name
E-Mail: $email
Message: $message
";

mail($to, $subject, $body);
echo “Your message has be sent to $to!”;

} else {

echo “Oh dear! There has been an error. Please try again :)”;

}

?>

I am building my website with Joomla locally, so I haven’t actually got it up on the internet yet, would this stop the script from working correctly?

When I click submit I always get the message: Your message has be sent to pink.melody@rocketmail.com! but I haven’t had any emails yet.

I would really appreciate any help :slight_smile: