innoweb/silverstripe-symfony-mailer-emogrifier

Easily integrate Emogrifier into SilverStripe and send Emails with inlined CSS automatically.

1.0.0 2023-05-16 12:27 UTC

This package is auto-updated.

Last update: 2024-04-16 14:19:43 UTC


README

Version License

Overview

Easily integrate Emogrifier into Silverstripe and send Emails with inlined CSS automatically.

This is based on bummzack/silverstripe-emogrify, integration Emogrifier with Symfony Mailer.

Requirements

Note: this module is compatible with Silverstripe 5. For Silverstripe 4, please see the bummzack/silverstripe-emogrify.

Installation

Install the module using composer:

composer require innoweb/silverstripe-symfony-mailer-emogrifier dev-master

Then run dev/build.

Configuration

By default, the plugin will inline CSS that is part of the HTML, eg. styles defined in <style> tags.

You can also supply a global css file via config:

Innoweb\SymfonyMailerEmogrifier\Extensions\MailerSubscriberExtension:
  css_file: 'public/_resources/themes/yourtheme/css/email.css'

Please note that if the path to the CSS file is not absolute, it will be considered to be relative to the BASE_PATH!

License

BSD 3-Clause License, see License