<commit_before># SilverStripe Mailgun Mailer

This module lets you send SilverStripe emails through the [official Mailgun PHP library](https://github.com/mailgun/mailgun-php), falling back to PHP's built-in `sendmail()` if Mailgun is unreachable.

## Requirements
 * PHP 5.4+
 * SilverStripe ~3.1
 * [Mailgun-PHP](https://github.com/mailgun/mailgun-php)

## Installation
Install with Composer. [Learn how](https://docs.silverstripe.org/en/getting_started/composer/#adding-modules-to-your-project)

```
composer require "micschk/silverstripe-mailgun-mailer:~1.0"
```

## Documentation

You will need to provide a Mailgun API key for a verified domain that you have set up in your [Mailgun account](https://mailgun.com/app/domains/).

## Example configuration

In your project's `_config/config.yml` file:

```yaml
MailgunMailer:
  api_key: 'your-key-goes-here'
```

In your project's `_config.php` file:

```php
Injector::inst()->registerService(new MailgunMailer(), 'Mailer');<commit_msg>Readme edit<commit_after># SilverStripe Mailgun Mailer

This module lets you send SilverStripe emails through the [official Mailgun PHP library](https://github.com/mailgun/mailgun-php), falling back to PHP's built-in `sendmail()` if Mailgun is unreachable.

## Requirements
 * PHP 5.4+
 * SilverStripe ~3.1
 * [Mailgun-PHP](https://github.com/mailgun/mailgun-php)

## Installation
Install with Composer. [Learn how](https://docs.silverstripe.org/en/getting_started/composer/#adding-modules-to-your-project)

```
composer require "micschk/silverstripe-mailgun-mailer:~1.0"
```

## Documentation

You will need to provide a Mailgun API key for a verified domain that you have set up in your [Mailgun account](https://mailgun.com/app/domains/).

## Example configuration

In your project's `_config/config.yml` file:

```yaml
MailgunMailer:
  api_key: 'key-goes-here'
  api_domain: 'verified-domain'
```

In your project's `_config.php` file:

```php
Injector::inst()->registerService(new MailgunMailer(), 'Mailer');
{'fraction_non_alphanumeric': 0.1374312843578211, 'fraction_numerical': 0.005997001499250375, 'mean_word_length': 5.217391304347826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5228961', 'n_tokens_mistral': 693, 'n_tokens_neox': 660, 'n_words': 172}