docs: polish README wording and add quick start section

- Fixed a broken sentence referencing @decomplexity’s SendOauth2 wrapper
- Improved wording and consistency for SMTPS, STARTTLS, and XOAUTH2 references
- Added a short “Quick start” block under Installation & loading to help beginners find the happy path faster
- Highlights the Composer install command and points readers to the minimal and full example sections
This commit is contained in:
Godswill Nte 2026-01-07 00:39:36 +03:00 committed by GitHub
parent 7e3f24386f
commit e5864a534d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 5 deletions

View File

@ -15,14 +15,14 @@
## Features
- Probably the world's most popular code for sending email from PHP!
- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more
- Integrated SMTP support send without a local mail server
- Integrated SMTP support — send without requiring a local mail server
- Send emails with multiple To, CC, BCC, and Reply-to addresses
- Multipart/alternative emails for mail clients that do not read HTML email
- Add attachments, including inline
- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
- Support for UTF-8 content and 8-bit, base64, binary, and quoted-printable encodings
- Full UTF-8 support when using servers that support `SMTPUTF8`.
- Support for iCal events in multiparts and attachments
- SMTP authentication with `LOGIN`, `PLAIN`, `CRAM-MD5`, and `XOAUTH2` mechanisms over SMTPS and SMTP+STARTTLS transports
- SMTP authentication with `LOGIN`, `PLAIN`, `CRAM-MD5`, and `XOAUTH2` mechanisms over SMTPS and SMTP with STARTTLS
- Validates email addresses automatically
- Protects against header injection attacks
- Error messages in over 50 languages!
@ -47,6 +47,11 @@ This software is distributed under the [LGPL 2.1](https://www.gnu.org/licenses/o
## Installation & loading
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
### Quick start
1. Install with Composer:
```sh
composer require phpmailer/phpmailer
```json
"phpmailer/phpmailer": "^7.0.0"
```
@ -59,8 +64,8 @@ composer require phpmailer/phpmailer
Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer.
If you want to use XOAUTH2 authentication, you will also need to add a dependency on the `league/oauth2-client` and appropriate service adapters package in your `composer.json`, or take a look at
by @decomplexity's [SendOauth2 wrapper](https://github.com/decomplexity/SendOauth2), especially if you're using Microsoft services.
If you want to use XOAUTH2 authentication, you will also need to add a dependency on the `league/oauth2-client` and appropriate service adapter packages in your `composer.json`, or take a look at
[SendOauth2 wrapper](https://github.com/decomplexity/SendOauth2) by @decomplexity's, especially if you're using Microsoft services.
Alternatively, if you're not using Composer, you
can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually: