SMTP email through Microsoft 365 via C#
An example of how to use the System.Net namespace to send emails (useful for ssl or tls mail servers). 1234567891011121314151617181920SmtpClient server = new SmtpClient("Smtp.mail.microsoftonline.com"); server.Port = 587; server.EnableSsl = true; …