Blog Discussion: Programmatically sending templated emails with dynamic data
Blog Post: Programmatically sending templated emails with dynamic data
Continue discussions 🤗 on this blog post below.
Answers
Great post, exactly what we need.
The Kentico documentation strong emphasis that Notifications should only be used internally (to Users), and not for Members, but it sounds like a possible solution too.
Any news if and when the API will become publically available to easily send emails from code?
Since the latest refresh IEmailTemplateMergeService
is gone. How can we fix this?
Unfortunately, there is nothing about it in the release notes.
I think I fixed it by using IEmailComposerFactory
:
var composer = await emailComposerFactory.Create(emailConfiguration);
var mergedTemplate = await composer.Compose(emailConfiguration, false);
Roel,
Since it was an .Internal
namespace API we don't document any breaking changes for it. Use at your own risk! 😅 (this is mentioned at the top of the blog post).
But, if you want to see what this implementation looks like in v30.2.0, take a look at the Kentico Community Portal source code.
To answer this question, you have to login first.