title: .NET project stopped sending emails after server migration
body: <p>I migrated a .NET Framework REST API project into a new server and new domain. The OS on both the previous and the new server are Windows Server 2016. I'm using gmail smtp server over SSL/TLS. The relevant ports are open in AWS (where I migrated to).</p>
  
  <p>I am able to send emails manually using powershell, but when calling the API, nothing happens.
  The same smtp config works on the old server - so this part is fine.</p>
  
  <p>I'm a bit clueless when it comes to windows server and/or .NET and I might have missed something obvious. For example, I'm not sure whether I need to setup SMTP server on IIS when using gmail smtp.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>following @TheEdge suggestion, I looked around in the Event Log and it looks like I'm getting Audit Failures. I can't make sense out of it though.</p>
  
  <pre><code>An account failed to log on.
  
  Subject:
      Security ID:        NULL SID
      Account Name:       -
      Account Domain:     -
      Logon ID:       0x0
  
  Logon Type:         3
  
  Account For Which Logon Failed:
      Security ID:        NULL SID
      Account Name:       USER4
      Account Domain:     
  
  Failure Information:
      Failure Reason:     Unknown user name or bad password.
      Status:         0xC000006D
      Sub Status:     0xC0000064
  
  Process Information:
      Caller Process ID:  0x0
      Caller Process Name:    -
  
  Network Information:
      Workstation Name:   -
      Source Network Address: __.___.___.___
      Source Port:        0
  
  Detailed Authentication Information:
      Logon Process:      NtLmSsp 
      Authentication Package: NTLM
      Transited Services: -
      Package Name (NTLM only):   -
      Key Length:
  </code></pre>