| Full Description | If emails are not being sent, it is probably due to the PHP mail() function not being enabled on your hosting service. Sometimes, this is done by default to prevent spam. Contact your hosting provider to ensure it is available. If you want to test whether PHP mail() is working on your server, create a file with the following code, upload it to your server, and then access it in your browser. If it says "sent email", then PHP mail() is working; if it says "failed", then it is not functional on your server. <?PHP
$this_site_name = 'my site name'; $email_to = 'youremail@yourdomain.com'; $email_subj = "Test Email"; $email_msg = "This is a test email."; $email_from = "From:\"$this_site_name\" ";
if(mail($email_to,$email_subj,$email_msg,$email_from)){ echo 'sent mail'; } else{ echo 'failed'; }
?> |