How do I configuren unique SMTP servers per website channel?

2025/06/07 1:20 PM

HI group, I have an XbyK instance, currently at V30.4.0, and I need to be able to configure SMTP settings on a website channel by website channel basis.  I found this documentation, https://docs.kentico.com/documentation/developers-and-admins/configuration/email-configuration, but this is specific to email channels.  The idea is that when a user completes a form, or other activity, I can tap into the global event handler, get some information and send an email with the channel specific SMTP services and using Kentico's email queue services.  I'm not seeing an OOB way of doing this....any thoughts?

Tags:
Email channels Website channels

Answers

2025/06/16 5:31 PM

I think you'd need to decorate CMS.EmailEngine.IEmailClient which uses CMS.EmailEngine.Internal.IEmailClientCreator internally to get the correct email client (and its SMTP settings) for each email.

There are lower level APIs like CMS.EmailEngine.ISmtpClientFactory but they don't have enough information to allow you to change the SMTP options per email.

I haven't tested any of this so no guarantees if its a viable path.

Because some of these APIs are in .Internal namespaces, we can't support this kind of customization and you might experience breaking changes between Refreshes.

To answer this question, you have to login first.