Blog Discussion: Programmatically sending templated emails with dynamic data

2023/11/09 9:36 PM

Blog Post: Programmatically sending templated emails with dynamic data

Continue discussions 🤗 on this blog post below.

Answers

2024/12/11 7:53 AM

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?

2025/03/06 12:39 PM

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);

2025/03/06 5:01 PM

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.