New to our community ?

Discover a world of possibilities! Join us and explore a vibrant community where ideas flourish and connections thrive.

One of Our Valued Members

Thank you for being part of our community. Your presence enriches our shared experiences. Let's continue this journey together!

Home PHP MAILER Send Mail Without SMTP Authentication

Send Mail Without SMTP Authentication


Welcome Back to, today we will see how to send mail without SMTP Authentication .

First of all we should know about overall funcationality of SMTP.

Send Mail Without SMTP Authentication

in the basic words we can say SMTP is Simple Mail Transfer Protocol, and it defines the method that handles the process of email exchange and delivery across IPs.
In our Previous Post we send mail with SMTP Authentication.

Also Read : Read XML file Using Php

Track vistior location of your website

Build a Facebook messenger chatbot using php

Generate Random Password Using php

SMTP communication between mail servers uses TCP port 25.
Most of the time we use Phpmailer for sending emails. Initially it was works fine when we using SMTP by username and password.
In the below code we send mail without SMTP Authentication

 require 'class/class.phpmailer.php';

$mail = new PHPMailer;
$mail->setFrom('', 'First Last');
$mail->addAddress("", "Recepient Name");
$mail->addReplyTo("", "Reply");

$mail->Subject = "Subject Text";
$mail->Body = "<i>Welcome To Shortlearner</i>";
$mail->AltBody = "This is the plain text version of the email content";

    echo "Mailer Error: " . $mail->ErrorInfo;
    echo "Message has been sent successfully";