简体   繁体   中英

Rails: Best way to implement dynamic email contents and layouts?

I want to have functionality where admin can easily change the content/copy of emails, designer can easily change the design and layouts

I am thinking about mailchimp templates (& Using-Handlebars-for-dynamic-content) but I found some limitations over there like can not share common code across the templates (header /footer) , can not set subject of templates and many more..

So I want to make simple admin panel where I show the email templates stored in database and users can edit the copy of email/ do html css changes/ can preview the email / can send test email, I will also display some dynamic text varibles so that users can use those as well like {{ first_name }}

Any help?

Finally I am using Mandrill after some try on other alternatives There are few reasons why I am able to decide

  1. Very good html editor
  2. Block helpers available in Mandrill (if-else, loops) Like LIQUID
  3. I can share templates from mailchimp to mandrill
  4. Outbound Logs and templates will be at one place
  5. I can use draft functionality of templates to make new design before publishing it

Here are some useful links you should try

  1. http://blog.mandrill.com/handlebars-for-templates-and-dynamic-content.html
  2. https://mandrill.zendesk.com/hc/en-us/articles/205582537-Using-Handlebars-for-Dynamic-Content

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM