Kirby mailer wrapper plugin


I’ve created this plugin in preparation to integration I’m planning to do with PHPMailer to a different plugin, but since it can be used independently, and I saw some people asking about a PHPMailer mail drivers I decided to upload this now.

This plugin adds 3 things

  1. kirby mail log driver - this will just log your emails into a file - I like it for developing.
  2. kirby mail phpmailer driver. send your emails through smtp
  3. kirby mail wrapper class - basically just turns the regular syntax to a fluent api - which I find more readable.

So this -

$email = email(array(
  'to'      => '',
  'from'    => '',
  'subject' => 'Yay, Kirby sends mails',
  'body'    => 'Hey, this is a test email!'


turns into

$mailer = new lcd344\Mailer('mail');



updated the api a bit, I will also be next adding an optional panel page to mail users.

Version 1.0 has now been officially released. It includes a way to bind data and inject it into email body using mustaches.


Thanks for sharing :slight_smile:

Hello @LCD344,

If we decide to use your plugin, I suppose we have to update PHPMailer in your code to patch the last security issue ?
Indeed, your Github repository has not been updated since 5 months and the issue has been discovered last December.

I’m asking just to be sure :wink:


thanks for the headsup - I actually updated it for myself and forgot to push it… now its good!
I hope you enjoy using it!