Skip to content

Commit

Permalink
PickupDirectoryLocation - SmtpServer is no longer RequiredParameter (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot authored Aug 30, 2023
1 parent 8a25f6b commit 78fee64
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/NLog.MailKit/MailTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ public Layout Body
/// Gets or sets SMTP Server to be used for sending.
/// </summary>
/// <docgen category='SMTP Options' order='10' />
[RequiredParameter]
public Layout SmtpServer { get; set; }

/// <summary>
Expand Down Expand Up @@ -467,7 +466,12 @@ private void CheckRequiredParameters()
var smtpAuthentication = RenderLogEvent(SmtpAuthentication, LogEventInfo.CreateNullEvent());
if (smtpAuthentication == SmtpAuthenticationMode.Ntlm)
{
throw new NLogConfigurationException("NTLM not yet supported");
throw new NLogConfigurationException("SmtpAuthentication NTLM not yet supported");
}

if (PickupDirectoryLocation is null && SmtpServer is null)
{
throw new NLogConfigurationException("SmtpServer is required");
}
}

Expand Down

0 comments on commit 78fee64

Please sign in to comment.