Please Help - Change the "sendmail_from" in form hosted by GoDaddy

Hi,

I have an account on GoDaddy with several sites. I was originally told that any emails sent to the from the site forms would come from the individual site account names but they aren’t, they’re coming from the main account name. I want to change where the user sees that the mail is coming from but the only place I know to change “sendmail_from” is in the php.ini file which I don’t have access to through GoDaddy. Can I change anything in the mailer.php file to change where the mail is coming from?

Thank you for your help.
Aliooop

Which ‘mailer.php’ are you using?

This is my mailer.php code (minus the HTML for the actual page):

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

$to = “info@anglesurvey.com”;
$subject = “New Request from anglesurvey.com”;
$name_field = $_POST[‘name’];
$address_field = $_POST[‘address’];
$city_field = $_POST[‘city’];
$state_field = $_POST[‘state’];
$zip_field = $_POST[‘zip’];
$phone_field = $_POST[‘phone’];
$email_field = $_POST[‘email’];
$message = $_POST[‘message’];
$besttime = $_POST[‘drop_down’];

$body = "From: $name_field
Address: $address_field
City: $city_field
State: $state_field
Zip: $zip_field
Phone: $phone_field
E-Mail: $email_field
BestTime: $besttime
Message:
$message
";

mail($to, $subject, $body);
} else {

echo “Not Submitted. Please try again.”;

}
?>

Thanks,
Aliooop

$headers = "From: ".filter_var($message,FILTER_SANITIZE_EMAIL)."\
";
mail($to, $subject, $body, $headers);

Where do I put the in actual email address?

in StarLions code you would put the email address in place of $message.

For example:

$headers = "From: ".filter_var("email@domain.com",FILTER_SANITIZE_EMAIL)."\
";