https://github.com/roots/acorn-mail
Simple WordPress SMTP using Acorn.
https://github.com/roots/acorn-mail
Last synced: 5 months ago
JSON representation
Simple WordPress SMTP using Acorn.
- Host: GitHub
- URL: https://github.com/roots/acorn-mail
- Owner: roots
- License: mit
- Created: 2024-01-04T12:23:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-26T12:06:05.000Z (10 months ago)
- Last Synced: 2026-01-25T13:30:35.688Z (5 months ago)
- Language: PHP
- Homepage: https://github.com/roots/acorn-mail
- Size: 40 KB
- Stars: 27
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Acorn Mail



Acorn Mail is a simple package handling WordPress SMTP using Acorn's mail configuration.
## Requirements
- [PHP](https://secure.php.net/manual/en/install.php) >= 8.1
- [Acorn](https://github.com/roots/acorn) >= 3.0
## Installation
Install via Composer:
```sh
$ composer require roots/acorn-mail
```
## Getting Started
Start by optionally publishing Acorn's mail config:
```sh
$ wp acorn mail:config
```
SMTP credentials can be found in the published `mail.php` config file and default to environment variables.
## Usage
For most configurations, you can simply set the following variables in your environment:
```env
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:
```env
MAIL_ENCRYPTION=ssl
```
Once the credentials are properly configured, you can send a test email using Acorn's CLI:
```sh
$ wp acorn mail:test [--to=] [--subject=] [--body=]
```
You can customize the test email subject and body:
```sh
# Test with custom subject and body
$ wp acorn mail:test --subject="Deploy Test" --body="Deployment successful"
# Test with custom recipient
$ wp acorn mail:test --to=admin@example.com
```
If any errors are detected, they will be printed to console.
## Bug Reports
If you discover a bug in Acorn Mail, please [open an issue](https://github.com/roots/acorn-mail/issues).
## Contributing
Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.
## License
Acorn Mail is provided under the [MIT License](LICENSE.md).