PHPackages                             sksoft/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. sksoft/phalcon-mailer

Abandoned → [phalcon-ext/mailer](/?search=phalcon-ext%2Fmailer)Library[Mail &amp; Notifications](/categories/mail)

sksoft/phalcon-mailer
=====================

Mailer component as wrapper over SwiftMailer for Phalcon.

v3.0.1(4y ago)3757615[1 issues](https://github.com/phalcon-ext/mailer/issues)MITPHPPHP &gt;=5.4.0

Since Sep 14Pushed 4y ago5 watchersCompare

[ Source](https://github.com/phalcon-ext/mailer)[ Packagist](https://packagist.org/packages/sksoft/phalcon-mailer)[ RSS](/packages/sksoft-phalcon-mailer/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

Phalcon\\Ext\\Mailer
====================

[](#phalconextmailer)

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": {
		"phalcon-ext/mailer": "~2.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'
    ]
];
```

**PHP Mail**

```
$config = [
    'driver' 	 => 'mail',
    '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

35

—

LowBetter than 79% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% 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 ~245 days

Recently: every ~572 days

Total

11

Last Release

1797d ago

Major Versions

v1.1.0 → v2.0.02014-10-15

v2.1.0 → v3.0.02021-02-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b2b458b3327649abf9cec7ab299c2b5a4c917f2955b93df7c02f6ddaf16d70a?d=identicon)[KorsaR-ZN](/maintainers/KorsaR-ZN)

---

Top Contributors

[![KorsaR-ZN](https://avatars.githubusercontent.com/u/579410?v=4)](https://github.com/KorsaR-ZN "KorsaR-ZN (46 commits)")[![fbraz3](https://avatars.githubusercontent.com/u/10731570?v=4)](https://github.com/fbraz3 "fbraz3 (1 commits)")[![ovr](https://avatars.githubusercontent.com/u/572096?v=4)](https://github.com/ovr "ovr (1 commits)")

---

Tags

mailerphalconphpmailerphalconphalcon-extphalcon-mailer

### Embed Badge

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

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

###  Alternatives

[phalcon-ext/mailer

Mailer component as wrapper over SwiftMailer for Phalcon.

39196.9k2](/packages/phalcon-ext-mailer)[vanchelo/phalcon-mailer

Phalcon Mailer Service

392.4k](/packages/vanchelo-phalcon-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)[andrewdyer/slim3-mailer

Email support for the Slim Framework using Twig and Swift Mailer.

1032.7k](/packages/andrewdyer-slim3-mailer)[cattong/think-mailer

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

361.9k1](/packages/cattong-think-mailer)

PHPackages © 2026

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