bummzack / silverstripe-emogrify
Integrate Emogrifier plugin into SilverStripe.
Installs: 9 565
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 2
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- php: ^7.2 || ^8.0
- bummzack/swiftmailer-emogrifyplugin: ^1.0
- silverstripe/framework: ^4.9
Requires (Dev)
- sminnee/phpunit: ^5.7
- squizlabs/php_codesniffer: ^3
README
Easily integrate Emogrifier into SilverStripe and send Emails with inlined CSS automatically.
Installation and Requirements
- Requires the EmogrifierPlugin and its dependencies.
- SilverStripe 4.9+
Install via composer:
composer require bummzack/silverstripe-emogrify
Usage
The module will already register the EmogrifierPlugin
as a plugin on SwiftMailer. By default it will only pick up
styles that are part of your HTML (eg. in a <style>
tag).
To supply your own CSS file, add something like this to your config.yml
:
Bummzack\SilverStripeEmogrify\EmogrifierPlugin: css_file: 'mysite/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
!