c# - Send Email via Outlook - Stack Overflow
stackoverflow.com › send-email-via-outlookNov 16, 2020 · if (filePaths != null) { foreach (string file in filePaths) { //attach the file Outlook.Attachment oAttach = mail.Attachments.Add(file); } } mail.Subject = subject; mail.To = recipients; if (sendType == MailSendType.SendDirect) mail.Send(); else if (sendType == MailSendType.ShowModal) mail.Display(true); else if (sendType == MailSendType.ShowModeless) mail.Display(false); mail = null; outlookApp = null; return true; } catch (Exception ex) { return false; } }
C# - Send Email using Hotmail, Outlook.com, Office 365
www.emailarchitect.net › easendmail › exC# - Send email using Hotmail, Outlook.com, Office 365. The following c# example codes demonstrate how to send email using Hotmail, Outlook.com and Office 365 SMTP servers. Hotmail, Outlook.com SMTP Server. Hotmail/Live/Outlook.com SMTP server address is smtp.live.com. It requires explicit SSL (TLS) connection to do user authentication, and you should use your Hotmail/Live/Outlook.com email address as the user name for ESMTP authentication.