You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have set a "Umbraco.CMS.Global.Smtp" object in your appsettings.json, it's impossible to set username/password to "null" in for example a appsettings.Production.json. When left out they are simply merged, and when set to null (ignoring validation warnings), also causes a merge. The end result is that you should not set username/password on appsettings.json itself if you want appsettings.Development.json to connect to a local SMTP server for example (no username/password).
Specifics
No response
Steps to reproduce
Set Smtp settings with username/password on appsettings.json
Set Smpt settings with username/password set to null on appsettings.Development.json
Inject IEmailSender and send an email.
Code on line above will attempt to authenticate because because username/password is not actually null.
Expected result / actual result
The null-checks should be string.IsNullOrWhiteSpace() or similar.
The text was updated successfully, but these errors were encountered:
We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.
For more information about issues and states, have a look at this blog post
Thanks muchly, from your friendly Umbraco GitHub bot :-)
Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8
v9.0.1
Bug summary
Take a look at:
Umbraco-CMS/src/Umbraco.Infrastructure/Mail/EmailSender.cs
Line 134 in bd63974
If you have set a "Umbraco.CMS.Global.Smtp" object in your appsettings.json, it's impossible to set username/password to "null" in for example a appsettings.Production.json. When left out they are simply merged, and when set to null (ignoring validation warnings), also causes a merge. The end result is that you should not set username/password on appsettings.json itself if you want appsettings.Development.json to connect to a local SMTP server for example (no username/password).
Specifics
No response
Steps to reproduce
Expected result / actual result
The null-checks should be string.IsNullOrWhiteSpace() or similar.
The text was updated successfully, but these errors were encountered: