PHPackages                             baka/mail - 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. baka/mail

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

baka/mail
=========

Baka Component for handling email via a simple queue interfase

v0.2.1(7y ago)46.5k2[1 issues](https://github.com/bakaphp/mail/issues)[1 PRs](https://github.com/bakaphp/mail/pulls)MITPHPPHP &gt;=7.0

Since Nov 19Pushed 6y ago6 watchersCompare

[ Source](https://github.com/bakaphp/mail)[ Packagist](https://packagist.org/packages/baka/mail)[ RSS](/packages/baka-mail/feed)WikiDiscussions master Synced 3d ago

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

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

[](#phalconmailer)

Baka email wrapper for Swiftmailer with queue

Configure
---------

[](#configure)

**SMTP**

```
'email' => [
    'driver' => 'smtp',
    'host' => getenv('EMAIL_HOST'),
    'port' => getenv('EMAIL_PORT'),
    'username' => getenv('EMAIL_USER'),
    'password' => getenv('EMAIL_PASS'),
    'from' => [
        'email' => 'noreply@domain.do',
        'name' => 'YOUR FROM NAME',
    ],
    'debug' => [
        'from' => [
            'email' => 'noreply@domain.do',
            'name' => 'YOUR FROM NAME',
        ],
    ],
];
```

Setup DI
--------

[](#setup-di)

**createMessage()**

```
$di->set('mail', function () use ($config, $di) {

    //setup
    $mailer = new \Baka\Mail\Manager($config->email->toArray());

    return $mailer->createMessage();
});
```

**Sending a normal email()**

```
  $this->mail
    ->to('info@domain.do')
    ->subject('Test Normal Email queue')
    ->content('normal email send via queue')
    ->send();
];
```

**Sending a template normal email()**

```
  $this->mail
    ->to('info@domain.dom')
    ->subject('Test Template Email queue')
    ->params(['name' => 'test'])
    ->template('email.volt') //you can also use template() default template is email.volt
    ->send();
];
```

**Sending a normal email instantly, without queue()**

```
  $this->mail
    ->to('info@domain.do')
    ->subject('Test Normal Email now')
    ->content('send normal email now')
    ->sendNow();
];
```

Events
------

[](#events)

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

Setup CLI
---------

[](#setup-cli)

```
use Phalcon\Cli\Task;

/**
 * Class LsTask
 * @description('List directory content', 'The content will be displayed in the standard output')
 */
class MainTask extends Task
{
    use Baka\Mail\JobTrait;
}
```

Running CLI
-----------

[](#running-cli)

`php app.php main mailqueue email_queue`

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64% 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 ~27 days

Recently: every ~20 days

Total

8

Last Release

2539d ago

PHP version history (2 changes)v0.1PHP &gt;=7.0

0.2.x-devPHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/136c850ea7ec76b23cc5b1fed8507683cc891145cffedc7761fe73ce03960df3?d=identicon)[mctekk](/maintainers/mctekk)

---

Top Contributors

[![kaioken](https://avatars.githubusercontent.com/u/118385?v=4)](https://github.com/kaioken "kaioken (32 commits)")[![gabbanaesteban](https://avatars.githubusercontent.com/u/11374198?v=4)](https://github.com/gabbanaesteban "gabbanaesteban (15 commits)")[![rwhite27](https://avatars.githubusercontent.com/u/29263079?v=4)](https://github.com/rwhite27 "rwhite27 (2 commits)")[![josuegrullon](https://avatars.githubusercontent.com/u/11460967?v=4)](https://github.com/josuegrullon "josuegrullon (1 commits)")

---

Tags

beanstalkdmailphalconphalcon-phpphalconphpqueue

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/baka-mail/health.svg)

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

###  Alternatives

[cspoo/swiftmailer-mailgun-bundle

Swiftmailer Mailgun bundle

1031.1M](/packages/cspoo-swiftmailer-mailgun-bundle)

PHPackages © 2026

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