I am trying to send out an email when a form is sent and nothing is happening. I am using winHost as a provider. I have tried making a seperate .php file to just test the mail() function but no cigar –
mail('myemail','dfd','dsaf','dasfda');
Here is my set up for mailing –
$to = $agentemail;
$subject = "";
$message = "";
$from = "";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
Please let me know if you need anymore info.
As @alfasin has pointed out, you need to follow the example code on the first link he gave to the WinHost Knowledge Base:
You’ll need to replace the host and username with details of an actual email account you’ve got setup.