Navigate:
All ReposPHPMailer
~$PHPMAI0.0%

PHPMailer: Email creation and transfer library for PHP

SMTP client and MIME message builder for PHP.

LIVE RANKINGS • 08:08 AM • STEADY
OVERALL
#207
40
BACKEND & APIS
#11
3
30 DAY RANKING TREND
ovr#207
·Backe#11
STARS
22.0K
FORKS
9.9K
DOWNLOADS
7D STARS
+8
7D FORKS
+2
See Repo:
Share:

Learn more about PHPMailer

PHPMailer is a PHP class library for creating and sending email messages. It implements SMTP client functionality alongside support for the native mail() function, allowing email delivery across different server configurations. The library handles MIME multipart message construction, character encoding (UTF-8, base64, quoted-printable), attachment management, and email address validation. Common use cases include transactional email in web applications, newsletter delivery, and integration with content management systems and frameworks.


1

Native SMTP Implementation

Works across all platforms without requiring a local mail server. Supports STARTTLS and SMTPS transports with multiple authentication methods including LOGIN, PLAIN, CRAM-MD5, and XOAUTH2 for flexible deployment.

2

Comprehensive MIME Support

Constructs properly formatted multipart/alternative messages with inline attachments, iCal events, DKIM signing, and S/MIME signing. Handles complex encoding requirements (UTF-8, base64, quoted-printable) automatically per email standards.

3

Security-Focused Design

Built-in protections against header injection attacks with automatic email address validation. Includes error handling in 50+ languages and namespacing to prevent naming conflicts in applications.


use Laminas\Mail\Message;
use Laminas\Mail\Transport\Sendmail;

$message = new Message();
$message->setFrom('sender@example.com')
    ->addTo('recipient@example.com')
    ->setSubject('Order Confirmation')
    ->setBody('Your order #12345 has been confirmed.');

$transport = new Sendmail();
$transport->send($message);

vv7.0.0

Major version bump for BC break: `lang()`, `setLanguage()`, and `$language` are now static in child classes.

  • Update child class overrides to declare `lang()`, `setLanguage()`, and `$language` as static methods and properties.
  • Pin to 6.12.0 if you cannot refactor static calls immediately; 6.11.0/6.11.1 changes were reverted there.
vv6.12.0

Reverts 6.11.x changes that broke child classes; functionally identical to 6.10.0.

  • Pin to 6.12.0 if you extend PHPMailer classes and hit breakage in 6.11.x.
  • Upgrade to 7.0.0 instead if your code depends on features introduced in 6.11.0 or 6.11.1.
vv6.11.1

Patch release reverting a deprecation regression introduced in 6.11.0; review language-related changes from that prior release.

  • Update restores a previously deprecated argument that was incorrectly removed in 6.11.0.
  • Check 6.11.0 release notes for language-related breaking changes if upgrading from earlier versions.

See how people are using PHPMailer

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers