title: Sending Mail using NLog
body: <p>I have a SMTP Server configured in web config file. This a default SMTP server to send mail to client.</p>
  
  <p>Sometime if this default SMTP Server failed to send email to any client I have to notify admin by sending email by using different SMTP Server which I want to achieve by using NLOG.</p>
  
  <p>Configuration for NLOG is</p>
  
  <pre><code>    &lt;target name="sendMail" xsi:type="Mail" html="true" 
                        subject="Mail Sending failed" 
                        body="${message}" 
                        to="mymail@gmail.com" 
                        from="noreply@domain.com"
                        encoding="UTF-8"
                        enableSsl="False"
                        smtpUsername="smtpUser@domain.com"
                        smtpPassword="$mySecurePass12#$"
                        smtpServer="smtp.xxxxxxxx.com"
                        smtpPort="xxx"/&gt;
       &lt;/targets&gt;
  </code></pre>
  
  <p><br/><br/></p>
  
  <pre><code>&lt;logger name="SMTPServerChecker.SMTPCheck" minlevel="Info" writeTo="sendMail" /&gt;
  </code></pre>
  
  <p>I am also logged this error in a file which is working perfectly but not getting any mail</p>
  
  <p>In catch block code I have following code</p>
  
  <pre><code>catch (SmtpException ex)
              {
  
                  NLog.LogManager.GetCurrentClassLogger().Error(ex);
              }
  </code></pre>