Remove the default SMTP configuration
This commit is contained in:
committed by
Sebastiaan Janssen
parent
201a2cd7b1
commit
f993869482
@@ -70,7 +70,8 @@ namespace Umbraco.Core.Configuration
|
||||
|
||||
var config = WebConfigurationManager.OpenWebConfiguration(appPath);
|
||||
var settings = (MailSettingsSectionGroup)config.GetSectionGroup("system.net/mailSettings");
|
||||
if (settings == null || settings.Smtp == null) return false;
|
||||
// note: "noreply@example.com" is/was the sample SMTP from email - we'll regard that as "not configured"
|
||||
if (settings == null || settings.Smtp == null || "noreply@example.com".Equals(settings.Smtp.From, StringComparison.OrdinalIgnoreCase)) return false;
|
||||
if (settings.Smtp.SpecifiedPickupDirectory != null && string.IsNullOrEmpty(settings.Smtp.SpecifiedPickupDirectory.PickupDirectoryLocation) == false)
|
||||
return true;
|
||||
if (settings.Smtp.Network != null && string.IsNullOrEmpty(settings.Smtp.Network.Host) == false)
|
||||
|
||||
@@ -80,9 +80,14 @@
|
||||
|
||||
<system.net>
|
||||
<mailSettings>
|
||||
<!--
|
||||
If you need Umbraco to send out system mails (like reset password and invite user),
|
||||
you must configure your SMTP host here - for example:
|
||||
|
||||
<smtp from="noreply@example.com">
|
||||
<network host="127.0.0.1" userName="username" password="password" />
|
||||
</smtp>
|
||||
-->
|
||||
</mailSettings>
|
||||
</system.net>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user