I am having problems changing the 'from' email header in the following script. Everthing else works ok but the from line in the email received is the server name and not admin@mywebsite.com:
ini_set("sendmail_from", " admin@mywebsite.com ");
$adminSendTo = "admin@mywebsite.com";
$adminSubject = "Contact Form";
$adminMessage = "Contact Form: $subfirstname $sublastname Email: $subemail Subject of feedback: $subsubject Comments: $subcommentquestion
";
$adminHeaders = "From: My website Contact Form
";
$adminHeaders = "Reply-To: admin@mywebsite.com";
mail($adminSendTo, $adminSubject, $adminMessage, $adminHeaders);
Do I need to change settings in the php.ini file for this to work?