PHP has built-in mail() which can be used to send email without authentication.
When you use PHP mail(), it does not use SMTP authentication to relay email. Following us the sample script to send email using PHP mail() function:
When you use PHP mail(), it does not use SMTP authentication to relay email. Following us the sample script to send email using PHP mail() function:
Code:
<?php
$email = "[email protected]";
$message = "This is a test email using PHP mail() function" ;
// Here is PHP mail() function
mail("[email protected]", "Mail from PHP mail",$message, "From: $email");
echo "Mail Sent";
?>