So, I've set up a contact form for my website, and it's sending me e-mails when people sign-up. Here's the code:
<?php
include("include/settings.php");
if(isset($_POST['name']) && isset($_POST['contactEmail']) && isset($_POST['message'])){
$name = $_POST['name'];
$from = $_POST['contactEmail'];
$message = $_POST['message'];
$subject = "Message from " . $name;
if (mail ($to, $subject, $message, $from)) {
$response = array('sent' => 1);
echo json_encode($response);
} else {
$response = array('sent' => 0);
echo json_encode($response);
}
}
?>
Right now when I get an e-mail, it's from my godaddy servername. I don't mind if it continues to send from this email, but I need to have the from name changed to something different. Is this possible?