Send email using PHP mail function

  • Spammers will be banned immediately without warning. Read our Signup Policies here.
  • 🎉 We've Hit 1 MILLION VIEWS in April 2025! 🚀

    We're proud to announce that blackhatforums.net has officially crossed 1,000,000 page views in a single month — April 2025! 🤯

    This milestone is a direct result of your hustle, strategies, and contributions. Whether you're dominating SEO, pushing traffic, or just absorbing knowledge — this is your win. 💪

    👉 Read the Celebration Thread Here

    — The blackhatforums.net Team

romeo

Newbie
Messages
28
Likes
1
Points
3
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