Software Quality

December 28, 2015

E-Mail Templates ease development

Filed under: Azure — David Allen @ 12:33 pm

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,

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 Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: