I have developed websites using Drupal since 1998. Getting Simplenews to send HTML formatted emails in D8 has been the most frustrating experience I've had in all those years. I am very upset. I find the current state of D8 documentation to be quite shoddy overall, not just Simplenews. Here's a glaring example of what I'm talking about: I'm building a D8 site using D8 modules. I go to the README file in the simplenews directory and I'm reading all about how.
You can customize the theming of newsletters. Copy any of the *.tpl.php files from the simplenews module directory to your theme directory. Both general and by-newsletter theming can be performed. Theme newsletter body:
- simplenews-newsletter-body.tpl.php (for all newsletters)
- simplenews-newsletter-body--[newsletter_id].tpl.php
- simplenews-newsletter-body--[view mode].tpl.php
- simplenews-newsletter-body--[newsletter_id]--[view mode].tpl.php
Here's some news for the module developers: None of that exists in the D8 module! WTF, really? These are D7 instructions. Not very helpful esp since that README file contains some of the most complete and detailed instructions on this aspect of simplenews-- if you're using the D7 version, that is..
I have spent an all-nighter and several full days on configuring this. I'm using sipmplenews Version: 8.x-1.0-alpha2, mailsystem Version: 8.x-4.1, mimemail Version: 8.x-1.x-dev and smtp Version: 8.x-1.0-beta2. No matter what recipe I follow from the myriad of posts on this subject, this is what my HTML email messages look like when they arrive in my inbox: HTML tags visible and absolutely no formatting.
<h2>Testing 1234</h2> <span>Testing 1234</span> <div><div style="background: rgb(51, 102, 0) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"> <div style="color: #fff; text-align: center;">View this message in your browser <a href="http://example.com/phpList/archive/FTS-10-16-2016.htm" style="color: #fff;">HERE</a>.</div> <table border="1px solid" cellpadding="2" cellspacing="2" style="border-collapse: collapse; background-color: rgb(255, 255, 204); width: 75%; text-align: left; margin-left: auto; margin-right: auto; padding-top: 15px;"><tbody><tr><td style="background-image: url(http://example.com/sites/default/files/images/PosterBackground-web.jpg); width: 50%;"> <div style="text-align: center;"> <p><img src="http://example.com/sites/default/files/images/new-fot-logo-270-2.png" style="width: 85%; height: auto;" /></p> </div> </td> <td colspan="2"> <div style="float: right;"> <p><img alt="Skeeter Photo" src="http://example.com/sites/default/files/images/skeeter.image_.jpg" style="border: 1px solid ; margin: 4px; width: 50%; height: auto;" /><br /><small><small><b><small><small> MICHAEL “SKEETER” PILARSKI </small></small></b> </small></small></p> </div> <p> <a href="http://www.example.com"><img alt="Friends of the Trees Masthead" src="example.com/sites/default/files/images/top-fts.jpg" style="width: 100%` ...
If anyone has this working or if there is a sympathetic developer out there, hear my plea: Someone please create a step-by-step basic simplenews configuration that anyone can follow to get simplenews to successfully send HTML formatted emails from a D8 website. If it was a configuration that was just enough to get it to work (with a designated theme and any other variables set), user customization could follow once a successful email has been sent This whole thing has worn me out.