File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,6 @@ public Layout Body
177
177
/// Gets or sets SMTP Server to be used for sending.
178
178
/// </summary>
179
179
/// <docgen category='SMTP Options' order='10' />
180
- [ RequiredParameter ]
181
180
public Layout SmtpServer { get ; set ; }
182
181
183
182
/// <summary>
@@ -467,7 +466,12 @@ private void CheckRequiredParameters()
467
466
var smtpAuthentication = RenderLogEvent ( SmtpAuthentication , LogEventInfo . CreateNullEvent ( ) ) ;
468
467
if ( smtpAuthentication == SmtpAuthenticationMode . Ntlm )
469
468
{
470
- throw new NLogConfigurationException ( "NTLM not yet supported" ) ;
469
+ throw new NLogConfigurationException ( "SmtpAuthentication NTLM not yet supported" ) ;
470
+ }
471
+
472
+ if ( PickupDirectoryLocation is null && SmtpServer is null )
473
+ {
474
+ throw new NLogConfigurationException ( "SmtpServer is required" ) ;
471
475
}
472
476
}
473
477
You can’t perform that action at this time.
0 commit comments