I already respected SendGrid’s e-mail service. We use it for our Azure-hosted web solutions. They now have a template service, which makes development of attractive or complex emails even easier than ever.
Most applications that send email will have code to format the body of the email, substituting data into variables to produce a customized output. This works fine for simple emails. But if the messages are complex, or they change regularly, this can be a coding burden. If key users want to be involved in the content and styling, then it requires collaboration with coders. If you want the users to have full self-sufficiency in the email design, then you must build a data-driven solution.
Instead of doing all that work, you can obtain a service that offers templating, it can reduce the core code in your product. That is what I like about the SendGrid E-Mail template service, https://sendgrid.com/solutions/email-template-engine.
I found coding against the API to be quite easy. To add a substitution variable, which you do to get custom data into your email template, you use code as simple as this
sendGridMessage.AddSubstitution("%requesterName%", new List<string> { "John Doe"});
The template code to render this could be as simple as this
You have just received this email from %requesterName%. ...
Not only does it allow us to create templates with less code in our product, but their WYSIWYG editor and other tools make it quite easy to separate the duties between those who are delivering the code and those who may be crafting and styling the E-Mail message.
This feature illustrates one of the advantages of using Azure for a product: you can compose the solution from a large number of other services, thereby reducing custom code, which reduces time-to-market, and conserves scarce development resources for features that offer unique value, rather than squandering them on commodity capabilities.
Leave a Reply