PHPackages                             aimtofeel/wp-swift-mailer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. aimtofeel/wp-swift-mailer

ActiveWordpress-plugin

aimtofeel/wp-swift-mailer
=========================

Implementation of Swift Mailer for Wordpress.

v2.0.0(2y ago)485GPL-2.0-or-laterPHP

Since May 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/AimToFeel/wp-swift-mailer)[ Packagist](https://packagist.org/packages/aimtofeel/wp-swift-mailer)[ Docs](https://aimtofeel.com)[ RSS](/packages/aimtofeel-wp-swift-mailer/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (2)Versions (12)Used By (0)

Wordpress Swift Mailer
======================

[](#wordpress-swift-mailer)

Replaces default `wp_mail(...)` implementation with Swift Mailer support. Which will allow your website to send emails trough SMTP servers with ease.

Installation
------------

[](#installation)

This plugin can be installed with composer, not sure how to use Wordpress in combination with a package manager, take a look at [Roots/Bedrock](https://roots.io/bedrock/).

1. Require the package: `composer require aimtofeel/wp-swift-mailer`
2. Apply WP Swift Mailer configuration, and setup for example a SMTP connection

Configuration
-------------

[](#configuration)

To be able the start sending mail through Swift mailer we need to setup somethings. This package uses constants to setup the right values for you. The supported constants are listed below:

### `WP_SWIFT_MAILER_TRANSPORTER`

[](#wp_swift_mailer_transporter)

*Required*

Possible values:

- `smtp`

Currently this package only supports SMTP, just because I needed SMTP connectivity and don't really care about other transporters for now. But hey, if you want to help out and implement other Swift Mailer transporters feel free to submit a PR.

### `WP_SWIFT_MAILER_SENDER`

[](#wp_swift_mailer_sender)

*Required*

Define from which email address you would like to send mail from. For example: `no-reply@example.com`

### `WP_SWIFT_MAILER_SMTP_HOST`

[](#wp_swift_mailer_smtp_host)

*Required when using the SMTP transporter*

Define your SMTP host. For example when using Gmail: `smtp.gmail.com`.

### `WP_SWIFT_MAILER_SMTP_PORT`

[](#wp_swift_mailer_smtp_port)

*Required when using the SMTP transporter*

Define the port of the SMTP server. For example when using Gmail: `587`.

### `WP_SWIFT_MAILER_SMTP_ENCRYPTION`

[](#wp_swift_mailer_smtp_encryption)

*Required when using the SMTP transporter*

Encryption type of the SMTP connection. For example when using Gmail: `tls`.

### `WP_SWIFT_MAILER_SMTP_USERNAME`

[](#wp_swift_mailer_smtp_username)

*Not required, but probably needed when using SMTP transporter*

The username of which you will be able to sign into the SMTP server. When using Gmail this is your email address.

### `WP_SWIFT_MAILER_SMTP_PASSWORD`

[](#wp_swift_mailer_smtp_password)

*Not required, but probably needed when using SMTP transporter*

The password of which you will be able to sign into the SMTP server. When using Gmail this is your Gmail password.

#### Configuration example

[](#configuration-example)

Using Roots wp config:

```
Config::define('WP_SWIFT_MAILER_TRANSPORTER', 'smtp');
Config::define('WP_SWIFT_MAILER_SENDER', env('MAIL_SENDER'));
Config::define('WP_SWIFT_MAILER_SMTP_HOST', env('SMTP_HOST'));
Config::define('WP_SWIFT_MAILER_SMTP_PORT', env('SMTP_PORT'));
Config::define('WP_SWIFT_MAILER_SMTP_ENCRYPTION', env('SMTP_ENCRYPTION'));
Config::define('WP_SWIFT_MAILER_SMTP_USERNAME', env('SMTP_USERNAME'));
Config::define('WP_SWIFT_MAILER_SMTP_PASSWORD', env('SMTP_PASSWORD'));
```

Using pure php:

```
define('WP_SWIFT_MAILER_TRANSPORTER', 'smtp');
define('WP_SWIFT_MAILER_SENDER', env('MAIL_SENDER'));
define('WP_SWIFT_MAILER_SMTP_HOST', env('SMTP_HOST'));
define('WP_SWIFT_MAILER_SMTP_PORT', env('SMTP_PORT'));
define('WP_SWIFT_MAILER_SMTP_ENCRYPTION', env('SMTP_ENCRYPTION'));
define('WP_SWIFT_MAILER_SMTP_USERNAME', env('SMTP_USERNAME'));
define('WP_SWIFT_MAILER_SMTP_PASSWORD', env('SMTP_PASSWORD'));
```

Improvements list
-----------------

[](#improvements-list)

- Add support for more Swift Mailer transporters
- Add support for mail attachments

Open to code submission
-----------------------

[](#open-to-code-submission)

I'm always open to PR's. For example this package currently only supports the SMTP transporter, but it would be nice to support all Swift Mailer transporters. If you have some time on your hands and want to contribute, feel free to submit a PR.

Author
------

[](#author)

This package is created by [AimToFeel](https://aimtofeel.com).

License
-------

[](#license)

[GPLv2](https://www.gnu.org/licenses/gpl-2.0.html)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~103 days

Recently: every ~134 days

Total

11

Last Release

801d ago

Major Versions

v1.3.0 → v2.0.02024-03-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3ff49533b5298b88f5be7aff52b898326b934e5679ef191e779ac521c388205?d=identicon)[NiekVelde](/maintainers/NiekVelde)

---

Top Contributors

[![NiekVelde](https://avatars.githubusercontent.com/u/14216593?v=4)](https://github.com/NiekVelde "NiekVelde (16 commits)")

---

Tags

wordpressSwift\_MailerWordpress mailer

### Embed Badge

![Health badge](/badges/aimtofeel-wp-swift-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/aimtofeel-wp-swift-mailer/health.svg)](https://phpackages.com/packages/aimtofeel-wp-swift-mailer)
```

###  Alternatives

[roots/bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure

6.5k441.8k2](/packages/roots-bedrock)[humanmade/s3-uploads

WordPress plugin to store uploads on S3

2.1k2.4M9](/packages/humanmade-s3-uploads)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[10up/elasticpress

Supercharge WordPress with Elasticsearch.

1.3k374.3k6](/packages/10up-elasticpress)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
