# Email php form

**URL:** <https://forum.kirupa.com/t/email-php-form/254041>\
**Category:** Uncategorized\
**Created:** [March 7, 2008, 1:22pm UTC](https://forum.kirupa.com/t/email-php-form/254041 "2008-03-07T13:22:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kubana](https://avatars.discourse-cdn.com/v4/letter/k/d2c977/32.png) [@kubana](https://forum.kirupa.com/u/kubana)\
**Post date:** [March 7, 2008, 1:22pm UTC](https://forum.kirupa.com/t/email-php-form/254041/1 "2008-03-07T13:22:43Z")

</div>

Hello  
I made one from kirupas tutorial.  
Great thing but there is one problem. When I load the file.php on the server everything works perfectly. the file sends form to my email. than next day it doesn’t work. I have to load the file again on my server and than works… until next day…the story repeat itself…  
Please help!

This is the code:

```auto
<?php
$sendTo = "my@mail.com";
$subject = "contact form";
$headers = "From: " . $_POST["name"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>

```
