Send email using PHP mail function

romeo

Newbie
Messages
27
Likes
0
Points
1
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:
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";
?>
 

Members online

No members online now.