PHPackages                             pepijnsenders/swiftmailer - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. pepijnsenders/swiftmailer

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

pepijnsenders/swiftmailer
=========================

4.1.5(14y ago)016LGPLPHPPHP &gt;=5.2.4

Since Oct 27Pushed 12y agoCompare

[ Source](https://github.com/PepijnSenders/swiftmailer)[ Packagist](https://packagist.org/packages/pepijnsenders/swiftmailer)[ Docs](http://swiftmailer.org)[ RSS](/packages/pepijnsenders-swiftmailer/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (4)Used By (0)

Swift Mailer Bundle, by Taylor Otwell
-------------------------------------

[](#swift-mailer-bundle-by-taylor-otwell)

A Laravel Swift Mailer bundle, installable via the Artisan CLI:

```
php artisan bundle:install swiftmailer

```

You must then auto-load the bundle in bundles.php:

```
return array(
	'swiftmailer' => array('auto'=>true)
);

```

In your code, you need to get a Swift\_Mailer instance:

```
$mailer = IoC::resolve('mailer');

```

You will also need a message instance that will allow you to construct your message and later send:

```
$message = Swift_Message::newInstance('Subject Of Email');

```

Ultimately the final code to construct a message will look something like this:

```
// If you do not want to auto-load the bundle, you can use this
Bundle::start('swiftmailer');

// Get the Swift Mailer instance
$mailer = IoC::resolve('mailer');

// Construct the message
$message = Swift_Message::newInstance('Message From Website')
	->setFrom(array('example@example.com'=>'Mr Example'))
	->setTo(array('example@example.com'=>'Mr Example'))
	->addPart('My Plain Text Message','text/plain')
	->setBody('My HTML Message','text/html');

// Send the email
$mailer->send($message);

```

Or, since your controllers have dynamic access to the IoC container:

```
$this->mailer->send($message);

```

Swift Mailer, by Chris Corbyn
-----------------------------

[](#swift-mailer-by-chris-corbyn)

Swift Mailer is a component based mailing solution for PHP 5. It is released under the LGPL license.

- Homepage:
- Documentation:
- Mailing List:
- Bugs:
- Repository:

Swift Mailer is highly object-oriented by design and lends itself to use in complex web application with a great deal of flexibility.

For full details on usage, see the documentation.

IMPORTANT
---------

[](#important)

Users upgrading from version 3.x or earlier absolutely MUST read the documentation. In short, the API is considerably different so your old code won't "just work".

Donations
---------

[](#donations)

If you'd like to make a donation, we are working on a system where donations are taken on a per-feature-request basis via the website with target amounts for each feature. In the meantime however you may donate directly to the author via PayPal:

PayPal:

Donations are certainly voluntary, but seriously, you donors are complete legends and drive this project! :)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~34 days

Total

3

Last Release

5291d ago

### Community

Maintainers

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

---

Top Contributors

[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (141 commits)")[![d11wtq](https://avatars.githubusercontent.com/u/37948?v=4)](https://github.com/d11wtq "d11wtq (95 commits)")[![xdecock](https://avatars.githubusercontent.com/u/49789?v=4)](https://github.com/xdecock "xdecock (28 commits)")[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (11 commits)")[![philfreo](https://avatars.githubusercontent.com/u/97612?v=4)](https://github.com/philfreo "philfreo (6 commits)")[![javiereguiluz](https://avatars.githubusercontent.com/u/73419?v=4)](https://github.com/javiereguiluz "javiereguiluz (6 commits)")[![udat](https://avatars.githubusercontent.com/u/437040?v=4)](https://github.com/udat "udat (4 commits)")[![vicb](https://avatars.githubusercontent.com/u/248818?v=4)](https://github.com/vicb "vicb (3 commits)")[![lsmith77](https://avatars.githubusercontent.com/u/300279?v=4)](https://github.com/lsmith77 "lsmith77 (2 commits)")[![arjenjb](https://avatars.githubusercontent.com/u/327281?v=4)](https://github.com/arjenjb "arjenjb (2 commits)")[![tobiasnaumann](https://avatars.githubusercontent.com/u/380038?v=4)](https://github.com/tobiasnaumann "tobiasnaumann (2 commits)")[![adbre](https://avatars.githubusercontent.com/u/1292956?v=4)](https://github.com/adbre "adbre (1 commits)")[![omoikane](https://avatars.githubusercontent.com/u/145311?v=4)](https://github.com/omoikane "omoikane (1 commits)")[![pda](https://avatars.githubusercontent.com/u/15759?v=4)](https://github.com/pda "pda (1 commits)")[![davzie](https://avatars.githubusercontent.com/u/511831?v=4)](https://github.com/davzie "davzie (1 commits)")[![pkruithof](https://avatars.githubusercontent.com/u/330828?v=4)](https://github.com/pkruithof "pkruithof (1 commits)")[![sstok](https://avatars.githubusercontent.com/u/904790?v=4)](https://github.com/sstok "sstok (1 commits)")[![csanquer](https://avatars.githubusercontent.com/u/372677?v=4)](https://github.com/csanquer "csanquer (1 commits)")[![tenorviol](https://avatars.githubusercontent.com/u/157127?v=4)](https://github.com/tenorviol "tenorviol (1 commits)")[![arnaud-lb](https://avatars.githubusercontent.com/u/365207?v=4)](https://github.com/arnaud-lb "arnaud-lb (1 commits)")

---

Tags

mailmailer

### Embed Badge

![Health badge](/badges/pepijnsenders-swiftmailer/health.svg)

```
[![Health](https://phpackages.com/badges/pepijnsenders-swiftmailer/health.svg)](https://phpackages.com/packages/pepijnsenders-swiftmailer)
```

###  Alternatives

[nette/mail

📧 Nette Mail: A handy library for creating and sending emails in PHP.

49310.1M268](/packages/nette-mail)[voku/bounce-mail-handler

Bounce Mail Handler

49240.3k2](/packages/voku-bounce-mail-handler)[boundstate/yii2-mailgun

Mailgun integration for the Yii framework

28165.8k](/packages/boundstate-yii2-mailgun)[yzh52521/think-mail

A powerful and beautiful php mailer for All of ThinkPHP and Other PHP Frameworks based symfony

745.1k](/packages/yzh52521-think-mail)[yarcode/yii2-mailgun-mailer

Mailgun mailer implementation for Yii2

1576.5k](/packages/yarcode-yii2-mailgun-mailer)[sandstorm/templatemailer

Neos and Flow package for simple handling of template-based emails, including CSS inlining

1148.1k2](/packages/sandstorm-templatemailer)

PHPackages © 2026

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