Kentico not recognizing SMTP setup

2025/10/08 7:02 PM

Perhaps someone can spot what's not right here.. I'm following the documentation at https://docs.kentico.com/documentation/developers-and-admins/configuration/email-configuration and as such have my program.cs looking like this (screenshot).

And obviously some more. The configuration sections it's pointing to are available in the appsettings.json file. I've verified that the GetSection call returns the required information as outlined in the docs. Yet, when I go to Users or Email queue to send a testmail it keeps telling me e-mail is not setup. What could I be missing.. ?


Environment

Answers

2025/10/09 6:07 AM
Accepted answer

Are you using also the AddXperienceSystemSmtp and AddXperienceChannelSmtp as mentioned in the documentation? I have this in my program.cs and it works fine:

builder.Services.AddXperienceSystemSmtp();
builder.Services.ConfigureSystemSmtpOptions(builder.Configuration.GetSection("SystemSmtpOptions"));

builder.Services.AddXperienceChannelSmtp("DancingGoatEmails");
builder.Services.ConfigureSystemSmtpOptions(builder.Configuration.GetSection("DancingGoatEmails"));
2025/10/09 1:35 PM

Hi JurajO,

Thanks, while trying out things I must have removed the initial AddXperienceSystemSmtp and I didn't notice until you mentioned it! Added it back in, now Kentico sends mail. Appreciated!

To response this discussion, you have to login first.