This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (3.0.7) of this package.

Mailing extension for Cartalyst Platform

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0


3.0.7 2016-10-02 16:31 UTC

This package is not auto-updated.

Last update: 2021-10-16 03:17:47 UTC


Mailing extension for Cartalyst Platform



Add repository to your composer.json

"repositories": [
    "type": "composer",
    "url": ""

Download the package

composer require sanatorium/mailer


Download repository and copy it's contents to /extensions/sanatorium/mailer


Mailer is built to dispatch transactional emails when Event is triggered.

Getting started

Let's imagine you want to send emails to customer and admin when order is placed.

Preparing template

After installation, open Mailtransactions menu and choose + icon to Create new template

The template for notification to admin would looks something like this:

event: order.placed
subject: New order was placed
template: Hello admin!<br>New order was placed on your {{ config('') }} site<br>
receivers: {{ config('platform.mail.from.address') }}

Let's assume our $order object contains customer's email in $order->customer_email, therefore we create new template with notification for customer like this:

event: order.placed
subject: Your order on {{ config('') }}
template: Hello!<br>Thanks for your order!<br><br>Best regards,<br>{{ config('') }} site<br>
receivers: {{ $order->customer_email }}

And then we trigger the event and pass data anywhere in the application like this:

Event::fire('order.placed', ['order' => $order])


3.0.4 - 2016-09-15 - Platform 5 support, caching 1.2.3 - 2016-06-14 - Added common seed 1.1.0 - 2016-05-08 - Added simple documentation 1.0.0 - 2016-03-25 - Basic functionality



Q: No hint path defined for [sanatorium/mailer] A: This might be caused by barryvdh/laravel-debugbar. Set following collector to false to get rid of this error message:

'debugbar.collectors.mail' => false