roots/acorn-mail

Simple WordPress SMTP using Acorn's mail configuration.

Maintainers

Package info

github.com/roots/acorn-mail

Type:package

pkg:composer/roots/acorn-mail

Fund package maintenance!

roots

Statistics

Installs: 18 867

Dependents: 0

Suggesters: 0

Stars: 28

Open Issues: 3

v1.0.4 2026-02-05 16:07 UTC

This package is auto-updated.

Last update: 2026-03-09 19:47:07 UTC


README

Latest Stable Version Packagist Downloads Build Status Follow Roots Sponsor Roots

Acorn Mail is a simple package handling WordPress SMTP using Acorn's mail configuration.

Support us

We're dedicated to pushing modern WordPress development forward through our open source projects, and we need your support to keep building. You can support our work by purchasing Radicle, our recommended WordPress stack, or by sponsoring us on GitHub. Every contribution directly helps us create better tools for the WordPress ecosystem.

Requirements

Installation

Install via Composer:

$ composer require roots/acorn-mail

Getting Started

Start by optionally publishing Acorn's mail config:

$ 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:

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=ssl

Once 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 --to=admin@example.com

If any errors are detected, they will be printed to console.

Community

Keep track of development and community news.