Acorn Mail is a simple package handling WordPress SMTP using Acorn's mail configuration.
Install via Composer:
$ composer require roots/acorn-mailStart by optionally publishing Acorn's mail config:
$ wp acorn mail:configSMTP credentials can be found in the published mail.php config file and default to environment variables.
For most configurations, you can simply set the following variables in your environment:
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=If you need to change the default encryption from tls, you can set the encryption variable:
MAIL_ENCRYPTION=sslOnce the credentials are properly configured, you can send a test email using Acorn's CLI:
$ wp acorn mail:test [--to=] [--subject=] [--body=]You can customize the test email subject and body:
# Test with custom subject and body
$ wp acorn mail:test --subject="Deploy Test" --body="Deployment successful"
# Test with custom recipient
$ wp acorn mail:test [email protected]If any errors are detected, they will be printed to console.
If you discover a bug in Acorn Mail, please open an issue.
Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.
Acorn Mail is provided under the MIT License.