PHPMailer
by PHPMailer
PHPMailer is a code library that lets PHP programs build and send emails, including HTML messages, attachments and SMTP login. It is for developers who want reliable email sending without relying on PHP's basic mail() function.
- Stars
- 22.3k +1 a day
- Licence
- LGPL-2.1
- Runs on
- A small server
- Setup
- Moderate
- Language
- PHP
- Age
- 5549 days
What you can do with it
- Send HTML emails with plain-text fallbacks and attachments from a PHP site
- Connect to an SMTP server with login and TLS, including OAuth2 sign-in
- Sign emails with DKIM or S/MIME and send to several recipients
Make money with it
A freelance PHP developer could offer email setup and fixing services, such as getting WordPress or custom site emails delivered reliably.
An idea, not financial advice. Check the licence before charging for anything built on it.
Ways a business could use it
- Send order confirmations, invoices and contact-form replies from your own website without paying for extra plugins
- Build custom email notifications for client web projects using your existing SMTP provider
Can you use it commercially?
Usable in paid products, but changes to its own files must be shared under the same licence.
Not legal advice. Read the project's licence file before building a product on it.
Getting it running
Install it into a PHP project with Composer (composer require phpmailer/phpmailer), or download the zip and load the files manually.
Follow the official instructions in the project README.
Things to check
- Needs an SMTP server or email provider, which may cost money
- Needs PHP coding knowledge to use
- Licensed under LGPL 2.1, which has conditions if you redistribute modified versions
Checked 01 Nov 2026. Summary drafted by AI from the project's README.