PHPackages                             schema31/php-ci-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. schema31/php-ci-mailer

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

schema31/php-ci-mailer
======================

0.0.4(5y ago)018PHP

Since Sep 4Pushed 5y ago2 watchersCompare

[ Source](https://github.com/Schema31/php-ci-mailer)[ Packagist](https://packagist.org/packages/schema31/php-ci-mailer)[ RSS](/packages/schema31-php-ci-mailer/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

php-ci-mailer
=============

[](#php-ci-mailer)

======

[Packagist](https://packagist.org/packages/schema31/php-ci-mailer)

Mailer for CodeIgniter.

Install
-------

[](#install)

You can install the library using [composer](https://getcomposer.org/):

```
$ composer require schema31/php-ci-mailer
```

How to use
----------

[](#how-to-use)

Configurations
--------------

[](#configurations)

Here the list of all configuration attributes supported:

PreferenceDefault ValueOptionsDescriptionuseragentCodeIgniterNoneThe “user agent”.protocolmailmailsendmailmailpath/usr/sbin/sendmailNoneThe server path to Sendmail.smtp\_hostNo DefaultNoneSMTP Server Address.smtp\_userNo DefaultNoneSMTP Username.smtp\_passNo DefaultNoneSMTP Password.smtp\_port25NoneSMTP Port.smtp\_timeout5NoneSMTP Timeout (in seconds).smtp\_keepaliveFALSETRUEFALSEsmtp\_cryptoNo DefaulttlssslwordwrapTRUETRUEFALSEwrapchars76NoneCharacter count to wrap at.mailtypetexttexthtmlcharset$config\['charset'\]Character set(utf-8, iso-8859-1, etc.).validateFALSETRUEFALSEpriority312crlf\\n“\\r\\n”“\\n”newline\\n“\\r\\n”“\\n”bcc\_batch\_modeFALSETRUEFALSEbcc\_batch\_size200NoneNumber of emails in each BCC batch.dsnFALSETRUEFALSEfrom\_emailNo DefaultNone“From” e-mail address.from\_nameNo DefaultNone“From” display name.prefix\_subjectNo DefaultNoneIf you want to set a prefix for your subject### Internal configuration

[](#internal-configuration)

You can use an array of configurations:

```
$config = [];
$config['protocol'] = 'smtp';// mail, sendmail, smtp
$config['smtp_host'] = 'smtp_host';// SMTP Server Address.
$config['smtp_user'] = 'smtp_user';// SMTP Username.
$config['smtp_pass'] = 'smtp_pass';// SMTP Password.
$config['smtp_port'] = '25';// SMTP Port.
$config['mailtype'] = 'html';// text or html
$config['smtp_timeout'] = '30';// SMTP Timeout (in seconds).
$config['from_email'] = 'noreply@example.it';
$config['from_name'] = 'CI MAILER';
$config['prefix_subject'] = 'Mailer - ';

$mailer = new \Schema31\CiMailer\Mailer($config);
```

### Configuration file

[](#configuration-file)

You can use the file named "cemail.php" in application/config folder and the library loads it automatically:

```
$mailer = new \Schema31\CiMailer\Mailer();
```

Adding recipients
-----------------

[](#adding-recipients)

You can add a single or multiple recipients (like the "to", "cc", "bcc" recipient) with:

```
$mailer = new \Schema31\CiMailer\Mailer();

$mailer->setSingleTo("foo01@bar.com"); //Single "to" recipient
$mailer->setSingleCc("foo02@bar.com"); //Single "cc" recipient
$mailer->setSingleBcc("foo03@bar.com"); //Single "bcc" recipient
```

Or

```
$mailer = new \Schema31\CiMailer\Mailer();

$mailer->setMultipleTo(["foo01@bar.com", "foo0101@bar.com"]); //Multiple "to" recipient: "foo01@bar.com" and "foo0101@bar.com"
$mailer->setMultipleCc(["foo02@bar.com", "foo0202@bar.com"]); //Multiple "cc" recipient: "foo02@bar.com" and "foo0202@bar.com"
$mailer->setMultipleBcc(["foo03@bar.com", "foo0303@bar.com"]); //Multiple "bcc" recipient: "foo03@bar.com" and "foo0303@bar.com"
```

Or

```
$mailer = new \Schema31\CiMailer\Mailer();

$mailer->setSingleTo("foo01@bar.com,foo0101@bar.com"); //Multiple "to" recipient: "foo01@bar.com" and "foo0101@bar.com" comma separated
$mailer->setSingleCc("foo02@bar.com,foo0202@bar.com"); //Multiple "cc" recipient: "foo02@bar.com" and "foo0202@bar.com" comma separated
$mailer->setSingleBcc("foo03@bar.com,foo0303@bar.com"); //Multiple "bcc" recipient: "foo03@bar.com" and "foo0303@bar.com" comma separated
```

Printing debbuger message
-------------------------

[](#printing-debbuger-message)

If you want to print debug message after the send of the email:

```
$mailer = new \Schema31\CiMailer\Mailer();

//...

echo $mailer->printDebugger();
```

Sending an email
----------------

[](#sending-an-email)

```
$mailer = new \Schema31\CiMailer\Mailer();

//Method chaining is allowed
$mailer
->setSingleTo("foo01@bar.com")
->setSubject("Email di prova #" . uniqid())
->setMessage("La email di testo")
->send(); //returns true if the email is sent, false otherwise.
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Total

4

Last Release

2077d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/848636d8da9389154acabd22a7fc46a7b876730adff2070e56a19d1d89f90af6?d=identicon)[gabriele120987](/maintainers/gabriele120987)

---

Top Contributors

[![gabriele120987](https://avatars.githubusercontent.com/u/12832122?v=4)](https://github.com/gabriele120987 "gabriele120987 (11 commits)")

### Embed Badge

![Health badge](/badges/schema31-php-ci-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/schema31-php-ci-mailer/health.svg)](https://phpackages.com/packages/schema31-php-ci-mailer)
```

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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