You should be careful using the php [man]mail[/man] function to send mail. This function will queue up a message to be sent by your server's mail transfer agent. It will only return FALSE if there is some problem with your server's mail configuration. And even if your system responds well and mail() returns TRUE there are no guarantees that the mail will ever get delivered. I have found that it is very common for any cloud-hosted servers to be on an email ban list by default. There is a very good reason for this. If they weren't, then anyone could just fire up a cloud server and start sending spam mail.
Now, assuming that your mail function is correctly sending email and this email is arriving in your inbox, you can send additional custom headers using the mail function. YOU SHOULD BE VERY CAREFUL ADDING WHEN PUTTING USER INPUT DIRECTLY INTO MAIL HEADERS OR YOUR SCRIPT WILL BECOME AN OPEN RELAY AND BAD GUYS CAN USE IT TO SEND SPAM.. Always always always validate user input before you start cramming it into functions like mail.
If you want a reply-to header put into these emails (which should help accomplish what you want, then you might do something like this:
<?php
// YOU SHOULD VALIDATE THIS...maybe check to make sure it's just letters and spaces
$name = $_POST['name'];
$email = $_POST['email'];
// validate the email! This function is not perfect but it's pretty darn good.
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
die("$email is not a valid email address");
}
// VALIDATE this! numbers, spaces and dashes only?
$phone = $_POST['phone'];
// can't really validate this
$message = $_POST['message'];
// I added additional line breaks in the beginning hoping to prevent a bad guy from injecting mail headers into your message
$formcontent="\r\n\r\nName: $name \n Email: $email \n Phone: $phone \n Message: $message";
$to = "XXXXXX@hotmail.com";
$subject = "Siddharud Electrical Contact Form";
$mailheader = "From: $name \r\n";
// add FROM and reply-to headers
$mailheader .= "reply-to: $email\r\nfrom: $email\r\n";
mail($to, $subject, $formcontent, $mailheader) or die("Error!");
echo "<br><br><p style='color:#000'><b>Thank You $name</b></p><p style='color:#000'>We will be in touch as soon as possible.</p>";
echo "<p style='color:#000'>Go to <a href='index.html'><b>Home Page</b></a></p>";
?>
You might consider reading about email header injection to get a better idea of what I'm talking about.