Closed AntonyThorpe closed 8 years ago
Thanks, Anthony, I like this a lot. I think there should be an option to use the module without emogrifier though. Either a config setting on on SmtpMailer or a second mailer (i.e. SmtpMailer stays the same and we move this code to EmogrifiedSmtpMailer). I'd lean toward the former because it's easier to add to your existing code. What are your thoughts?
Thanks for your advice Mark. Have gone for the separate class option and added PHPMailer SMTP debug and error log options to the new EmogrifiedSmtpMailer class. Any feedback please?
Works for me. Thanks!
It would be a great benefit to inline CSS in HTML emails by default. This combined with the reliable PHPMailer and your easy configuration will create better looking emails for Silverstripe sites.
Was inspired by https://github.com/sunnysideup/silverstripe-newsletter_emogrify/blob/master/code/EmogrifierMailer.php and https://github.com/burnbright/silverstripe-inlinestylesemail/blob/master/code/InlineStylesMailer.php both of which inline CSS but without PHPMailer.
Have tested this pull request on a soon to be launched SS Shop site.
Thanks