title: Can't send emails! - SmtpFailedRecipientException: failed recipients - C# - Unity - Gmail
body: <p>I am having problems with sending emails from unity with gmail. It used to work before, but now it doesn't.</p>
  
  <p>Here is my code (there are some dutch words in it as message):</p>
  
  <pre><code>MailMessage mail = new MailMessage();
  
      mail.From = new MailAddress("hotkeycode@gmail.com", "Team HotkeyCode");
      mail.To.Add(CEmail);
      mail.Subject = "Bevestigings code voor de verlofuren bijhouder";
      mail.Body = "Hier heeft u uw bevestigingscode voor de verlofuren bijhouder: \n \n" + ConfirmCode + "\n \nBedankt voor het gebruiken van de verlofurenbijhouder! \n \nMet vriendelijke groet,\nTeam HotkeyCode\n\nHeeft u deze aanvraag niet gedaan? Negeer dit bericht dan en verwijder het!";
  
      SmtpClient smtpServer = new SmtpClient("smtp.gmail.com");
      smtpServer.Port = 587;
      smtpServer.Credentials = new System.Net.NetworkCredential("hotkeycode@gmail.com", "CENCORED PASSWORD") as ICredentialsByHost;
      smtpServer.EnableSsl = true;
      ServicePointManager.ServerCertificateValidationCallback =
          delegate (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
          { return true; };
      smtpServer.Send(mail);
  </code></pre>
  
  <p>I don't know what is going wrong. Please help me!</p>
  
  <p>Thanks in advance,</p>
  
  <p>Ablos</p>