first thing is you must ensure that the sender have a valid email domain or account, here's the sample script.
step 1: make a POST HTML Form that contain sender, subject and email message:
?>
if(isset($_POST['submit']))
{
$to = 'test@testdomain.com';
$subject = $_POST['subject'];
$message = $_POST['comment'];
$headers = 'From:'. $_POST['email'] . "\r\n" .
'Reply-To:'. $_POST['email'] . "\r\n" .
'X-Mailer: PHP/' . phpversion();
}
And Now you can send email from your own website.
Please Subscribe anc Comment.