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

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

jimigrunge/phalcon-mailer
=========================

Mailer component as wrapper over SwiftMailer for Phalcon.

v3.0.0(8y ago)06LGPLPHPPHP ~7.0

Since Sep 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jimigrunge/phalcon-mailer)[ Packagist](https://packagist.org/packages/jimigrunge/phalcon-mailer)[ RSS](/packages/jimigrunge-phalcon-mailer/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (11)Used By (0)

Jimigrunge\\Phalcon\\Mailer
===========================

[](#jimigrungephalconmailer)

Mailer wrapper over SwiftMailer for Phalcon.

Installing
----------

[](#installing)

Install composer in a common location or in your project:

```
curl -s http://getcomposer.org/installer | php

```

Create the composer.json file as follows:

```
{
	"require": {
		"jimigrunge/phalcon-mailer": "~3.0"
	}
}

```

Run the composer installer:

```
php composer.phar install
```

Add in your the code

```
require_once('vendor/autoload.php');

```

Configure
---------

[](#configure)

**SMTP**

```
$config = [
    'driver' 	 => 'smtp',
    'host'	 	 => 'smtp.gmail.com',
    'port'	 	 => 465,
    'encryption' => 'ssl',
    'username'   => 'example@gmail.com',
    'password'	 => 'your_password',
    'from'		 => [
    		'email' => 'example@gmail.com',
    		'name'	=> 'YOUR FROM NAME'
    	]
];
```

> **Warning**If you are using GMAIL and get error `...Username and Password not accepted...` or `password incorrect`, please using password token ([how get token?](https://support.google.com/accounts/answer/185833)) and fix in configuration
>
> ```
>   ...
>
>   'username' => 'example@gmail.com',
>   'password' => 'your_password_token',
>
>   ...
> ```

**Sendmail**

```
$config = [
    'driver' 	 => 'sendmail',
	'sendmail' 	 => '/usr/sbin/sendmail -bs',
    'from'		 => [
    	'email' => 'example@gmail.com',
    	'name'	=> 'YOUR FROM NAME'
    ]
];
```

Example
-------

[](#example)

### createMessage()

[](#createmessage)

```
$mailer = new \Phalcon\Ext\Mailer\Manager($config);

$message = $mailer->createMessage()
		->to('example_to@gmail.com', 'OPTIONAL NAME')
		->subject('Hello world!')
		->content('Hello world!');

// Set the Cc addresses of this message.
$message->cc('example_cc@gmail.com');

// Set the Bcc addresses of this message.
$message->bcc('example_bcc@gmail.com');

// Send message
$message->send();
```

### createMessageFromView()

[](#createmessagefromview)

> **Warning**If you want to use as a template engine VOLT (.volt), please setup "view" service according to the official [docs](http://docs.phalconphp.com/en/latest/reference/volt.html#activating-volt) Phalcon

```
/**
 * Global viewsDir for current instance Mailer\Manager.
 *
 * This parameter is OPTIONAL, If it is not specified,
 * use DI from "view" service (getViewsDir)
 */
$config['viewsDir'] = __DIR__ . '/views/email/';

$mailer = new \Phalcon\Ext\Mailer\Manager($config);

// view relative to the folder viewsDir (REQUIRED)
$viewPath = 'email/example_message';

// Set variables to views (OPTIONAL)
$params [
	'var1' => 'VAR VALUE 1',
	'var2' => 'VAR VALUE 2',
	...
	'varN' => 'VAR VALUE N',
];

/**
 * The local path to the folder viewsDir only this message. (OPTIONAL)
 *
 * This parameter is OPTIONAL, If it is not specified,
 * use global parameter "viewsDir" from configuration.
 */
$viewsDirLocal = __DIR__ . '/views/email/local/';

$message = $mailer->createMessageFromView($viewPath, $params, $viewsDirLocal)
		->to('example_to@gmail.com', 'OPTIONAL NAME')
		->subject('Hello world!');

// Set the Cc addresses of this message.
$message->cc('example_cc@gmail.com');

// Set the Bcc addresses of this message.
$message->bcc('example_bcc@gmail.com');

// Send message
$message->send();
```

Events
------

[](#events)

- mailer:beforeCreateMessage
- mailer:afterCreateMessage
- mailer:beforeSend
- mailer:afterSend
- mailer:beforeAttachFile
- mailer:afterAttachFile

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~138 days

Recently: every ~270 days

Total

9

Last Release

3196d ago

Major Versions

v1.1.0 → v2.0.02014-10-15

v2.0.3 → v3.0.02017-09-29

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v3.0.0PHP ~7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/05bea8ae3d72f71c176f0a46ba341713ab1a78d6fa44c8eba138f0fdc1e66faa?d=identicon)[jimigrunge](/maintainers/jimigrunge)

---

Top Contributors

[![KorsaR-ZN](https://avatars.githubusercontent.com/u/579410?v=4)](https://github.com/KorsaR-ZN "KorsaR-ZN (42 commits)")[![jimigrunge](https://avatars.githubusercontent.com/u/3765505?v=4)](https://github.com/jimigrunge "jimigrunge (5 commits)")[![ovr](https://avatars.githubusercontent.com/u/572096?v=4)](https://github.com/ovr "ovr (1 commits)")

---

Tags

mailerphalconphalcon-extphalcon-mailer

### Embed Badge

![Health badge](/badges/jimigrunge-phalcon-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/jimigrunge-phalcon-mailer/health.svg)](https://phpackages.com/packages/jimigrunge-phalcon-mailer)
```

###  Alternatives

[phalcon-ext/mailer

Mailer component as wrapper over SwiftMailer for Phalcon.

39199.8k2](/packages/phalcon-ext-mailer)[yuan1994/tp-mailer

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

812.0k1](/packages/yuan1994-tp-mailer)

PHPackages © 2026

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