I am using a script like this...
<?php$to = 'email@example.com';$subject = 'the subject';$message = 'hello';$headers = 'From: example.com' . "\r\n" .'Reply-To: example.com' . "\r\n" .'X-Mailer: PHP/' . phpversion();relay-hosting.secureserver.net
mail($to, $subject, $message, $headers);?>
....what do I need to do to get this to work?
Hi @codenamejupiter , thanks for posting.
If you are using a cPanel hosting plan and sending mail using PHP mail(), you should use 'localhost' as the server or not specify a server.
You will also want to ensure that the "From" address uses a domain name associated with your hosting plan.
If you continue to have trouble, please follow up with a detailed error message and a member of the Community might be able to offer some additional suggestions.