FoF Pretty Mail

Create HTML email for Flarum

Compatible with Flarum v1.8.5

Latest release 1.1.2

19,509 downloads

released on Apr 18, 2018

Tags

Pretty Mail by FriendsOfFlarum

License Latest Stable Version OpenCollective

A Flarum extension. Make custom HTML templates for emails!

  • Configure your custom email template from the extension settings
  • This supports all emails sent by Flarum, and 3rd party extensions

Extending

It is possible to make additional variables available to the templates from other extensions. For example:

In your extend.php

(new \FoF\PrettyMail\Extend\PrettyMail)
    ->addTemplateData('myNewVariable', Callback\NewVariableCallback::class),

The callback should be an invokable class, and accept \Flarum\Notification\Blueprint\BlueprintInterface, returning the string value that should be assigned to your new variable.

You should also include a translation using the key fof-pretty-mail.admin.settings.attributes.myNewVariable, which will be displayed in the extension settings page, so that admin users know what your new key is providing them, and were they should use it in their template.

Installation

Install with composer:

composer require fof/pretty-mail:"*"

Updating

composer update fof/pretty-mail

Important Note

Due to how Flarum handles certain emails, I had to utilize a "hack" to get it to work. Please report any issues you have to our Github.

Links

An extension by FriendsOfFlarum.

© 2024 Hyn by DaniĆ«l "Luceos" Klabbers. All rights reserved. · Extensions and extension information is provided by the respective (copyright holding) authors. · Extiverse is not affiliated to the Flarum project or Flarum foundation. · Images on Extiverse pages are from Unsplash.