1. Home
  2. Website
  3. Website Tips
  4. Sample script in sending email via PHP mailer function

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.”;
?>

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help for 24X7!
Click here to talk us!

Leave a Comment