mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
Bug 17246 : Orchard command line exception
Contribution credit goes to giddy --HG-- branch : dev
This commit is contained in:
@@ -34,7 +34,7 @@ namespace Orchard.Email.Services {
|
||||
return;
|
||||
}
|
||||
|
||||
using (var smtpClient = new SmtpClient()) {
|
||||
using (SmtpClient smtpClient = new SmtpClient()) {
|
||||
smtpClient.UseDefaultCredentials = !smtpSettings.RequireCredentials;
|
||||
if (!smtpClient.UseDefaultCredentials && !String.IsNullOrWhiteSpace(smtpSettings.UserName)) {
|
||||
smtpClient.Credentials = new NetworkCredential(smtpSettings.UserName, smtpSettings.Password);
|
||||
|
Reference in New Issue
Block a user