# Mailer.php problems

**URL:** <https://forum.kirupa.com/t/mailer-php-problems/314994>\
**Category:** Uncategorized\
**Created:** [October 14, 2010, 1:18pm UTC](https://forum.kirupa.com/t/mailer-php-problems/314994 "2010-10-14T13:18:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pinkmelody](https://avatars.discourse-cdn.com/v4/letter/p/e47c2d/32.png) [@pinkmelody](https://forum.kirupa.com/u/pinkmelody)\
**Post date:** [October 14, 2010, 1:18pm UTC](https://forum.kirupa.com/t/mailer-php-problems/314994/1 "2010-10-14T13:18:15Z")

</div>

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

**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](mailto:pink.melody@rocketmail.com)! but I haven’t had any emails yet.

I would really appreciate any help 🙂
