title: Mailbox unavailable. The server response was: 5.7.1 Unable to relay WinForms
body: <p>trying to send email from WinForms application for domain user.  This works fine for recipients that are on the domain, but for external recipients gives the <strong>Unable to Relay message</strong></p>
  
  <pre><code>            SmtpClient client = new SmtpClient(mailServer);
              client.Credentials = CredentialCache.DefaultNetworkCredentials;
              client.Send(mail);
  </code></pre>
  
  <p>Is it possible to use the user's account to provide credentials?
  System.Security.Principal.WindowsIdentity.GetCurrent();</p>
  
  <p>I've also tried setting UseDefaultCredentials to true and false and setting Credentials to null</p>
  
  <p>thanks
  Matt</p>