Current Version 2024.1.2.1
Release Date 15 Feb 2024
License MIT

First, what’s the difference between PHPMailer Pro and PHPMailer Lite?
PHPMailer Pro is a robust mail transport class designed to handle the needs of any user or application ... including large mailing lists and databases as well as single individual emails from website forms. PHPMailer Pro supports your choice of unauthenticated SMTP, authenticated SMTP, Sendmail, and IMAP.
PHPMailer Lite is designed to support unauthenticated SMTP and authenticated SMTP with minimal configuration. If SMTP cannot be used, PHPMailer Lite will default to Sendmail.

PHPMailer Lite is a new project. Like PHPMailer Pro, PHPMailer Lite is a mail transport class. PHPMailer Lite is has many properties and methods that are similar in name, but entirely different in approach. At approximately 50 Kb, it’s also one of the smallest full featured transport classes available.

How easy is it to send an SMTP email? Have a look at this sample below:

<?php
use codeworxtech\PHPMailerLite\PHPMailerLite;
require('src/PHPMailerLite.php');
$mail = new PHPMailerLite();
try {
  $mail->SetSender( ["sender@domain.com" => "Sender Name" ] );
  $mail->AddRecipient( ['recipient@domain.com'=>'Recipient Name'] );
  $mail->Subject     = "Test";
  $mail->MessageHTML = "<p>test message</p>";
  if ($mail->Send()) {
    echo "Message has been sent.<br>\n";
  }
} catch (Exception $e) {
  echo $e->errorMessage();
}
?>
... that's it. No need to define SMTP server, no need to define port number. It's that simple. And if the server you are using does not have a built in SMTP server, PHPMailer Lite automatically switches to Sendmail.

PHPMailer Lite supports PHP7.4 (and up) and is licensed under MIT).

Current Version 2024.1.2.1
License MIT