Code: [ Select all ]
<?PHP
//Place the email address that your site is going ot be using
$sender = 'admin@YourSite.com';
//Place any email address that you can visit that is different from the sender email.
$recipient = 'YourPersonalEmial@yahoo.com';
//----------------------------------------------------------------------------------
// Do not edit below unless you know what you are doing.
//----------------------------------------------------------------------------------
$subject = "PHP Mail Test";
$message = "If you are seeing this message in your email, then your site is sending emails.";
$headers = 'From:' . $sender;
if (mail($recipient, $subject, $message, $headers)) {
echo '<strong>Email Sent</strong>';
} else {
echo '<strong>Error: Email not sent</strong>';
}