PHPackages                             shadiakiki1986/swiftmailer-wrapper - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. shadiakiki1986/swiftmailer-wrapper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shadiakiki1986/swiftmailer-wrapper
==================================

wrapper function for swiftmailer

1.0.2(8y ago)01.3k1[1 issues](https://github.com/shadiakiki1986/swiftmailer-wrapper/issues)2CC0 1.0 UniversalPHPPHP &gt;=5.3.5

Since Sep 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/shadiakiki1986/swiftmailer-wrapper)[ Packagist](https://packagist.org/packages/shadiakiki1986/swiftmailer-wrapper)[ Docs](https://github.com/shadiakiki1986/swiftmailer-wrapper)[ RSS](/packages/shadiakiki1986-swiftmailer-wrapper/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (6)Used By (2)

Wrapper function for using [Swiftmailer](http://swiftmailer.org/) (in php)

Available on [packagist](https://packagist.org/packages/shadiakiki1986/swiftmailer-wrapper)

Install: `composer require shadiakiki1986/swiftmailer-wrapper:dev-master`

Use:

```
require_once __DIR__.'/vendor/autoload.php';

\SwiftmailerWrapper\Utils::mail_attachment(

  // attachments
  array("/path/to/file1","/path/to/file2"),

  // to, from, reply emails
  "to@email.com",
  "from@email.com",
  "From Name",
  "reply@email.com",

  // subject, body
  "This is a subject",
  "This is a message. It supports html.",

  // config array
  array(
    "host"=>"smtp.server.com",
    "port"=>"123",
    "username"=>"myUser",
    "password"=>"pizza"
  )

);
```

Files can be renamed in attachment by passing files parameter as follows:

```
  array("newName1"=>"/path/to/file1","newName2"=>"/path/to/file2"),
```

To use [encrypted smtp](http://swiftmailer.org/docs/sending.html#encrypted-smtp), add `security` key to the config array. Valid values are: `false, ssl, tls`

To add a backup SMTP server and credentials, add a `backup` key similar to the original config array, i.e. with `host, port, username, password, security`.

Testing
=======

[](#testing)

```
composer install
SWIFTMAILER_WRAPPER_EML1=my@gmail.com \
  SWIFTMAILER_WRAPPER_PWD1=password1 \
  SWIFTMAILER_WRAPPER_EML2=another@gmail.com \
  SWIFTMAILER_WRAPPER_PWD2=password2 \
  composer test
```

Note that emails above should be gmail accounts because the tests define the gmail server explicitly

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

5

Last Release

3227d ago

Major Versions

0.2 → 1.0.02017-05-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cc997a8672e96aaee90c8555b7e5bc9693894e74c7530abf2216ee6799357ff?d=identicon)[shadiakiki1986](/maintainers/shadiakiki1986)

---

Top Contributors

[![shadiakiki1986](https://avatars.githubusercontent.com/u/8392324?v=4)](https://github.com/shadiakiki1986 "shadiakiki1986 (20 commits)")

---

Tags

swiftmailer

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[foolz/foolfuuka

The FoolFuuka Imageboard

2201.8k](/packages/foolz-foolfuuka)[mremi/contact-bundle

Implementation of a contact form for Symfony2

2712.4k2](/packages/mremi-contact-bundle)

PHPackages © 2026

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