Download the PHP package wp-spaghetti/wp-mail-transport without Composer

On this page you can find all versions of the php package wp-spaghetti/wp-mail-transport. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-mail-transport

PHP Version Packagist Downloads Packagist Stars GitHub Actions Workflow Status Coverage Status Known Vulnerabilities GitHub Issues GitHub Release License

WP Mail Transport

Symfony Mailer transport that uses WordPress's wp_mail() function, allowing you to use Laravel's Mail facade while leveraging WordPress email plugins.

Works with any Laravel + WordPress setup: Acorn (w/wo Sage), WP Starter, Corcel, or custom integrations.

Features

Requirements

Installation

1. Install the package

In your Laravel + WordPress project (Sage theme, WP Starter, etc.):

The package auto-registers via service provider discovery.

2. Configure mail transport

Update your config/mail.php:

3. Set environment variable

Update your .env:

That's it! The transport will now use WordPress's wp_mail() function.

Usage

Basic Email

Using Mailables

HTML Emails

With Attachments

Multiple Recipients

Custom Headers

Framework-Specific Examples

Sage Themes (Acorn)

WP Starter

Corcel

How It Works

Architecture

Technical Details

Email Conversion:

Header Handling:

Attachment Processing:

Error Handling:

WordPress Plugin Integration

The transport automatically works with popular WordPress email plugins:

WP Mail SMTP

Configure WP Mail SMTP in WordPress admin, then use Laravel's Mail facade normally:

SendGrid Plugin

Install and configure the SendGrid WordPress plugin:

Mailgun Plugin

Configure Mailgun in WordPress, then:

Advanced Configuration

Publish Configuration (Optional)

This creates config/wp-mail.php with debugging options:

Debug Mode

Enable debug logging to troubleshoot email delivery issues:

In .env:

Or in config/wp-mail.php:

What gets logged:

Logging System: Debug messages are logged using Laravel's Log facade at the debug level. Configure logging in config/logging.php:

Log Format: Laravel automatically formats logs with timestamp and context:

Log Channels: You can specify different log channels in config/logging.php:

Note: Debug mode logs sensitive information (email addresses). Only enable in development or when troubleshooting specific issues.

Multiple Mailers

You can use multiple transports in the same application:

Then switch between them:

Custom From Address

Set globally in config/mail.php:

Or per-email:

Troubleshooting

Emails not being sent

  1. Check if wp_mail() is working:

  2. Check WordPress email plugins:

    • Ensure WP Mail SMTP or similar plugin is configured
    • Test sending from WordPress admin
  3. Enable debug mode:

With debug mode enabled, the transport will log detailed information about each email using Laravel's logging system. Check your logs in storage/logs/laravel.log:

What gets logged:

Example debug output:

Configure logging channels in config/logging.php to send logs to different destinations (files, Slack, syslog, etc.).

Attachments not working

Ensure your WordPress upload directory is writable:

Custom headers not appearing

Some WordPress email plugins may strip custom headers. Check your plugin's settings or filters.

From address being overridden

WordPress plugins may force a specific From address. Check:

Testing

Comparison with Other Solutions

Feature wp-mail-transport roots/acorn-mail Others
Framework Support ✅ Acorn, WP Starter, Corcel, Custom ❌ Acorn only ❌ Usually Acorn only
WordPress Plugin Integration ✅ Yes ❌ No (SMTP only) ⚠️ Limited
Configuration Required ✅ Minimal ⚠️ SMTP setup needed ⚠️ Varies
Attachment Support ✅ Yes ✅ Yes ✅ Yes
HTML Email Support ✅ Yes ✅ Yes ✅ Yes
Maintained ✅ Active ✅ Active ⚠️ Varies

Changelog

Please see CHANGELOG for a detailed list of changes for each release.

We follow Semantic Versioning and use Conventional Commits to automatically generate our changelog.

Release Process

All releases are automatically created when changes are pushed to the main branch, based on commit message conventions.

Contributing

For your contributions please use:

See CONTRIBUTING for detailed guidelines.

Sponsor

Buy Me A Coffee

License

(ɔ) Copyleft 2026 Frugan.
GNU GPLv3, see LICENSE file.


All versions of wp-mail-transport with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
symfony/mailer Version ^6.0 || ^7.0 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wp-spaghetti/wp-mail-transport contains the following files

Loading the files please wait ...