Sunday, August 21, 2016

How to create a Drupal 7 newsletter with HTML email formatting

How to create a Drupal 7 newsletter with HTML email formatting


Enable Simplenews (and dependencies):
drush en -y simplenews mimemail mailsystem htmlmail 
drush updatedb 

Configure Simplenews to use HTML format and default send action is to "Send newsletter":
/admin/config/services/simplenews/settings 

Configure your custom newsletter content type to use HTML format:
/admin/config/services/simplenews/categories//edit 

Give "Subscribe to newsletters" and "Choose to receive plaintext emails via HTML Mail" permissions to all roles and give the remaining Simplenews permissions to Content Administrators (or other desired role):
/admin/people/permissions 

Additional secret-decoder-ring configuration:
https://www.drupal.org/node/1283756#comment-5733262 

Add newsletter subscribe block to desired theme section:
/admin/structure/block 

Logout of site and subscribe via block from previous step.  P.S. You can also auto-populate subscribers here:
/admin/people/simplenews

Login to site and create newsletter:
/node/add/simplenews 

Send newsletter to queue (by clicking the "Newsletter" tab of the newly created node):
/node//simplenews 

Run cron to process the queue (may need to run multiple times if number of recipients is greater than "cron throttle" setting on /admin/config/services/simplenews/settings/mail):
/admin/reports/status/run-cron 

P.S. Its better to use real cron instead of Drupals default poormanscron.


Go to link download