Skip to content

Commit

Permalink
#127 suppress warning for SmtpClient (won't be removed - only obsolet…
Browse files Browse the repository at this point in the history
…e in the mono sdk)
  • Loading branch information
FreeAndNil committed Mar 19, 2024
1 parent 35767bd commit d884330
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/log4net/Appender/SmtpAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ protected virtual void SendEmail(string messageBody)
// The old API is deprecated.

// Create and configure the smtp client
#pragma warning disable CS0618 // Type or member is obsolete
using SmtpClient smtpClient = new SmtpClient();
#pragma warning restore CS0618 // Type or member is obsolete
if (!String.IsNullOrEmpty(m_smtpHost))
{
smtpClient.Host = m_smtpHost;
Expand Down

0 comments on commit d884330

Please sign in to comment.