Sample script in sending email via PHP mailer function

Step : Add the below code to the php file and execure the link.

<?php
$to = “someone@example.com,someother@example.com”;
$subject = “Test mail”;
$message = “Hello! This is a test email message.”;
$from = “someonelse@example.com”;
$headers = “From:” . $from;
mail($to,$subject,$message,$headers);
echo “Mail Sent.”;
?>

Related Articles