title: How to make McAfee cool with sending mail from my workstation?
body: <p>I am developing an application for a server and it must send mail occasionally for notifications to users.  </p>
  
  <pre><code>MailMessage mm = new MailMessage();
  
  mm.To.Add("me@domain.net");
  mm.From = new MailAddress("you@domain.net");
  mm.Subject = "J/K";
  mm.Priority = MailPriority.Normal;
  mm.IsBodyHtml = false;
  mm.Body = "Greetings and salutations";
  
  SmtpClient client = new SmtpClient("host.address.lcl");
  client.Send(mm);
  </code></pre>
  
  <p>If I put the app on an actual server it works fine, but on my workstation, depending upon how I access the code, it either silently fails or throws an exception.  In either case a McLogEvent is generated:</p>
  
  <pre><code>Blocked by port blocking rule (Anti-virus Standard Protection:Prevent 
  mass mailing worms from sending mail).
  </code></pre>
  
  <p>...and the exception says:</p>
  
  <pre><code>System.Net.Mail.SmtpException: Failure sending mail. ---&gt; System.Net.WebException: 
  Unable to connect to the remote server ---&gt; System.Net.Sockets.SocketException: 
  No connection could be made because the target machine actively refused it [IP &amp; Port Numbers] 
  </code></pre>
  
  <p>It looks like a rule on my workstation is working to keep the mail from being generated, directly or indirectly, but I'm not sure what to make of the "actively refused it" part, since if the McLogEvent text seems to suggest that it wouldn't get that far.</p>
  
  <p>I should point out that if I use System.Web.Mail it works great.  The drawback being of course compiler messages about this namespace being deprecated in favor of System.Net.Mail.</p>
  
  <p>Anyone have any idea of how to make McAfee cool with sending mail from my workstation?</p>