PHPackages                             andrelohmann-silverstripe/smtpmailer - 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. andrelohmann-silverstripe/smtpmailer

ActiveSilverstripe-module[Mail &amp; Notifications](/categories/mail)

andrelohmann-silverstripe/smtpmailer
====================================

SMTPMailer for Silverstripe

3.1.0(10y ago)09502PHPPHP &gt;=5.3.2

Since Aug 15Pushed 10y ago1 watchersCompare

[ Source](https://github.com/andrelohmann/silverstripe-smtpmailer)[ Packagist](https://packagist.org/packages/andrelohmann-silverstripe/smtpmailer)[ RSS](/packages/andrelohmann-silverstripe-smtpmailer/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

Fork of
--------------------------------------------------------

[](#fork-of-httpwwwsilverstripeorgsmtpmailer-module)

Requirements
------------

[](#requirements)

Silverstripe 3.3.x

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

[](#installation)

add the following to your \_ss\_environment.php

```
// smtpmailer
define('SMTPMAILER', json_encode([
	"charset_encoding" => "utf-8", // E-mails characters encoding, e.g. : 'utf-8' or 'iso-8859-1'
	"debug_level" => "0", // Print debugging informations. 0 = no debuging, 1 = print errors, 2 = print errors and messages, 4 = print full activity
    "debug_stop" => true, // Stop Script on debugging. true = echo and die, false = echo can be catched by ob_start(); $var = ob_get_clean();
	"credentials" => [
		"default" => [
			"server_address" => "smtp.gmail.com", // SMTP server address
			"server_port" => "465", // SMTP server port. Set to 25 if no encryption or tls. Set to 465 if ssl
			"secure_connection" => "ssl", // SMTP encryption method : Set to '' or 'tls' or 'ssl'
			"do_authenticate" => true, // Turn on SMTP server authentication. Set to false for an anonymous connection
			"username" => "__EMAILADDRESS__", // SMTP server username, if do_authenticate == true
			"password" => "__PASSWORD__", // SMTP server password, if do_authenticate == true
			"from" => "__EMAILADDRESS__" // From Address: e.g. "My Name" , optional, use when from address needs to be fixed
		],
		"log" => false // false or array with credentials
	]
]));

// Error Log Email Address
define('LOG_EMAIL','__EMAIL__'); // logs will be send to this address, if defined
```

default and log credentials are mendatory. if you want to offer different smtp gateways inside your app, just add them to the credentials array.

selecting a special credentials set for an email is done by setting the credentials config

```
Config::inst()->update('SmtpMailer', 'credentials', '__CREDENTIALS_SET__'); // "default" by default
```

### Example

[](#example)

Example code for fetching debugging return code and using it inside your application

```
$settings = Config::inst()->get('SmtpMailer', 'settings');
$settings['debug_level'] = 4;
$settings['debug_stop'] = false;
Config::inst()->update('SmtpMailer', 'settings', $settings);

// start collecting the echo messages
ob_start();

// SEND MAIL
$email = new Email();
$email->setTo(__EMAIL__);
$email->setSubject(__SUBJECT__);
$email->setBody(__BODY__);
$success = $email->sendPlain();

// write echo messages into Variable
$echoes = ob_get_clean();

if(!success) die($echoes);

```

### Notice

[](#notice)

This repository uses the git flow paradigm. After each release cycle, do not forget to push tags, master and develop to the remote origin

```
git push --tags
git push origin develop
git push origin master

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Recently: every ~52 days

Total

9

Last Release

3702d ago

Major Versions

v1.2 → v2.0.02015-09-01

v2.0.1 → 3.0.02016-04-09

### Community

Maintainers

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

---

Top Contributors

[![andrelohmann](https://avatars.githubusercontent.com/u/617168?v=4)](https://github.com/andrelohmann "andrelohmann (27 commits)")

### Embed Badge

![Health badge](/badges/andrelohmann-silverstripe-smtpmailer/health.svg)

```
[![Health](https://phpackages.com/badges/andrelohmann-silverstripe-smtpmailer/health.svg)](https://phpackages.com/packages/andrelohmann-silverstripe-smtpmailer)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[october/rain

October Rain Library

1601.7M80](/packages/october-rain)[humanmade/aws-ses-wp-mail

WordPress plugin to send mail via SES

188268.0k8](/packages/humanmade-aws-ses-wp-mail)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[etailors/mautic-amazon-ses

Amazon SES Mailer Plugin for Mautic

574.2k](/packages/etailors-mautic-amazon-ses)

PHPackages © 2026

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