How to build a transactional email platform with Craft I am building a transactional email platform for my users.
Users will subscribe to a digital program and receive daily emails depending on their profile and parameters.    

This email sending will be:
 - time based
 - and user subscription based
 (and not event based)  

So I found these plugins:  


Sprout Email > for marketing campaigns and email notifications triggered by events
Postmaster for Craft CMS > looks more promising for my need but the plugin seems not maintained anymore (last commit was two years ago) 


So do you know another recent Craft plugin to do transactional emails?
Or would you recommend another approach/idea?
This answer will focus on using Sprout Email for transactional emails.

Transactional Emails

First, a comment on semantics. I feel the question above is drawing a distinction between two types of transactional emails: triggered and automated.

Triggered emails are a one-off, context-specific email that get sent to a user when an event is triggered by a user's interaction with the application. Automated emails, which seems to be the focus of the question, are transactional in the sense that they are a one-to-one email to a user, however the email is not triggered by a specific event, but by an automated process. A user takes an action to be placed in a specific category, and transactional emails are sent to all users in that category on a specified schedule.

Triggered emails are fairly easy to build a UI around in Craft. Automated emails are harder, as you probably have to rely on either tasks (which can't be reliably scheduled at a specific time) or cron-jobs (which require extra steps by web developers to be setup).

Sprout Email and triggered emails

While the default Sprout Email Notifications are mostly User and Entry events, Sprout Email is not at all limited to User and Entry events. 

Sprout Email has a flexible Custom Event API where you can create custom triggers for the events you need to support with as many settings as you wish to control them with. An example can be seen in Sprout Forms, which adds a trigger for When a form entry is submitted.

Sprout Email allows you to manage the Triggered Email content right in Craft alongside your other content and all the admin needs to do is select the event which should trigger them being sent.

Sprout Email and automated emails

You'll have to create a custom script and setup a cron to ping your script to send out emails on the schedule you require, but Sprout Email can support (and is in use for) advanced transactional campaigns that allow content editors to easily manage email content in a Craft-friendly way, and programmatically send out transactional email on a regular schedule.

You can programmatically trigger a Notification Email using the Sprout Email service layer. Notification Emails are sent via the SproutEmail_DefaultMailerService using the sendNotification() method:

craft()-&gt;sproutEmail_defaultMailer-&gt;sendNotification($campaign, $object);



$campaign needs to be a SproutEmail_CampaignModel
$object is any object that you want to make available to your email templates.


At some point we'll probably add additional support in Sprout Email around dynamic list management and automated emails. Right now, it's quite possible, it just requires a custom integration that fits your needs.