Download the PHP package trk/processwire-php-mailer without Composer
On this page you can find all versions of the php package trk/processwire-php-mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download trk/processwire-php-mailer
More information about trk/processwire-php-mailer
Files in trk/processwire-php-mailer
Package processwire-php-mailer
Short Description This module extends WireMail base class, integrating the PHPMailer mailing library into ProcessWire.
License MIT
Homepage https://github.com/trk/WireMailPHPMailer
Informations about the package processwire-php-mailer
WireMailPHPMailer
A robust, modern integration of the popular PHPMailer library for the ProcessWire CMS/CMF. This module transparently extends the core WireMail class, allowing you to use advanced mailing features via familiar API calls, or access the native PHPMailer instance directly for fine-grained control.
Requirements
- ProcessWire:
3.0.0or newer - PHP:
8.0or newer (Strict Types enforced)
Installation
- Copy the module files into your
site/modules/WireMailPHPMailer/directory. - In the ProcessWire admin, go to Modules > Refresh.
- Locate WireMailPHPMailer under the WireMail section and click Install.
- Configure your SMTP, Sendmail, or PHP Mail settings directly via the module's configuration screen.
(Note: The module comes pre-packaged with the PHPMailer library in the vendor directory. You do not need to run Composer manually unless you are doing custom developmental modifications.)
Usage
You can use the module through the standard ProcessWire WireMail API or access the underlying PHPMailer instance directly.
1. The Classic WireMail Way (Recommended)
This approach seamlessly integrates into existing ProcessWire core API workflows.
2. The Native PHPMailer Way
If you need advanced configuration, attachments, or specific PHPMailer features, you can interact with the instance directly.
Features & Configuration
The module provides an extensive settings page in the ProcessWire admin (Modules > Configure > WireMailPHPMailer) where you can define:
- Transport method: SMTP, Sendmail, or native
mail() - SMTP credentials: Host, Port, Username, Password, AutoTLS (enabled by default)
- SMTP via DSN: A single Data Source Name string (e.g.,
smtps://user:[email protected]:465) that overrides Host/Port/SMTPSecure/Username/Password. Powered by PHPMailer's native DSNConfigurator. - Encryption: SSL / TLS
- Authentication Types: LOGIN, PLAIN, CRAM-MD5, and native XOAUTH2 support.
- DKIM Signing: Domain, Identity, Selector, Path to Private Key
- Global Defaults: Default Sender (
From/FromName), Reply-To, and Bcc tracking.
XOAUTH2 (Google, Microsoft, Yahoo, Azure) Support
WireMailPHPMailer supports natively injecting XOAUTH2 authentication directly into ProcessWire's unified WireMail flow via the underlying PHPMailer engine.
Because OAuth2 providers are heavy, this module allows you to selectively install the right provider package to the root workspace using Composer, keeping the module core lightweight.
1. Install an OAuth2 Provider Library
From your ProcessWire project root (where the main composer.json is located), require the provider:
- For Google:
composer require league/oauth2-google - For Yahoo:
composer require hayageek/oauth2-yahoo - For Microsoft:
composer require stevenmaguire/oauth2-microsoft - For Azure:
composer require greew/oauth2-azure-provider
2. Configure XOAUTH2 Settings
- Go to Modules > Configure > WireMailPHPMailer.
- Select XOAUTH2 under
Auth Type. - Fill out the OAuth2 Settings block that appears below it:
- Select the OAuth Provider (Google, Yahoo, Microsoft, or Azure).
- Enter your OAuth Email (the account initiating sending).
- Provide your Client ID and Client Secret.
- (Azure Only) Specify your Tenant ID (or leave default
common).
- Save the module settings.
3. Generate a Refresh Token
After saving your Client ID and Client Secret, an Authorize via {Provider} button will appear in the settings.
- Click the authorization button.
- Follow the prompt to consent and log into your provider account.
- You will be redirected back securely to the module's setup page, where the module automatically pulls and saves your Refresh Token.
That's it! WireMailPHPMailer will intercept ProcessWire's Mail sends and handle token refreshes in the background natively.
Support & Links
License
This module is free and open-source software.