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

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

ttek/tk-mail
============

A mail lib using PHPMailer for the tk libs

8.0.4(1y ago)0998MITPHP

Since Sep 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tropotek/tk-mail)[ Packagist](https://packagist.org/packages/ttek/tk-mail)[ RSS](/packages/ttek-tk-mail/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (55)Used By (0)

tk-mail
=======

[](#tk-mail)

**Project:** tk-mail
**Web:**
**Authors:** Michael Mifsud

A mail lib for the Tk lib. Uses PHPMailer for the email driver.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Introduction](#introduction)

Installation
------------

[](#installation)

Available on Packagist ([ttek/tk-mail](http://packagist.org/packages/ttek/tk-mail)) and installable via [Composer](http://getcomposer.org/).

```
composer require ttek/tk-mail
```

Or add the following to your composer.json file:

```
"ttek/tk-mail": "~3.0"
```

Introduction
------------

[](#introduction)

Basic Example:

```
$message = new \Tk\Mail\Message();
$message->addTo('info@tropotek.com');
$message->setFrom('godar@tropotek.com.au');
$message->setSubject('This is a test email');
$message->setBody(\App\Config::createMailTemplate('This is some message text'));

$message->send();
```

Available Config Params:

```
/* Default config options */
$cfg = array();

/*
 * Options mail, smtp, sendmail, qmail
 */
$cfg['mail.driver'] = 'mail';

/*
 * SMTP settings
 */

/**
 * SMTP hosts.
 * Either a single hostname or multiple semicolon-delimited hostnames.
 * You can also specify a different port
 * for each host by using this format: [hostname:port]
 * (e.g. "smtp1.example.com:25;smtp2.example.com").
 * You can also specify encryption type, for example:
 * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465").
 * Hosts will be tried in order.
 * @var string
 */
$cfg['mail.smtp.host'] = 'localhost';
// The default SMTP server port.
$cfg['mail.smtp.port'] = 25;
$cfg['mail.smtp.username'] = '';
$cfg['mail.smtp.password'] = '';
// What kind of encryption to use on the SMTP connection. Options: '', 'ssl' or 'tls'
$cfg['mail.smtp.secure'] = '';
// Whether to use SMTP authentication. Uses the Username and Password properties.
$cfg['mail.smtp.enableAuth'] = true;
// Whether to keep SMTP connection open after each message. If this is set to true
//   then to close the connection requires an explicit call to smtpClose().
$cfg['mail.smtp.enableKeepAlive'] = '';

// Checks if the send command was called from this site
$cfg['mail.checkReferer'] = true;
// Add valid domain names as valid referers if needed
$cfg['mail.validReferers'] = '';

/*
 * Other misc options
 * Generally from the site config
 */
// Set this if you want all email to go to this address during debug
//$cfg['system.debug.email'] = 'debug@'.$_SERVER['HTTP_HOST'];

// \Tk\Request Used to set the X-Sender-IP, X-Referer headers
//$cfg['request'] = '';
// \Tk\Session Used to set the X-SiteReferer header
//$cfg['session'] = '';

// If true then all outgoing messages are sent to the `system.debug.email` address
//$cfg['debug'] = false;

// If set X-Application will be set to this
//$cfg['system.name'] = '';
//$cfg['system.version'] = '';

// Change this to suite your message body encoding
//$cfg['mail.encoding'] = 'UTF-8';
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~56 days

Recently: every ~110 days

Total

53

Last Release

660d ago

Major Versions

2.0.26 → 3.2.x-dev2019-04-09

3.2.4 → 8.0.x-dev2022-11-12

3.2.18 → 8.0.02023-06-27

3.2.22 → 8.0.22024-09-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa80fc289e479be5ed6dbc793415c86e5192a1213370a87a71929e1c8cfc9e2f?d=identicon)[tropotek](/maintainers/tropotek)

---

Top Contributors

[![fvas-elearning](https://avatars.githubusercontent.com/u/13041550?v=4)](https://github.com/fvas-elearning "fvas-elearning (65 commits)")[![tropotek](https://avatars.githubusercontent.com/u/2274290?v=4)](https://github.com/tropotek "tropotek (65 commits)")

---

Tags

tabletropotek

### Embed Badge

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

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[ivantcholakov/codeigniter-phpmailer

A CodeIgniter 3 compatible email-library powered by PHPMailer.

25214.2k](/packages/ivantcholakov-codeigniter-phpmailer)

PHPackages © 2026

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