mailkit

MailKit unsuccessful SMTP OAuth with Microsoft 365 server

此生再无相见时 提交于 2020-06-28 03:57:11
问题 I'm using MailKit 2.6.0.0 to connect to Microsoft 365 using OAuth for authentication with POP3, IMAP, and SMTP. The ImapClient and Pop3Client authenticate successfully but the SmtpClient does not. Here's the protocol log from MailKit: Connected to smtp://smtp.office365.com:587/?starttls=always S: 220 MN2PR04CA0011.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sat, 30 May 2020 07:48:32 +0000 C: EHLO [192.168.1.240] S: 250-MN2PR04CA0011.outlook.office365.com Hello [my-ip] S: 250

Send a single email to multiple recipients using Mailkit or mimekit

前提是你 提交于 2020-06-25 22:52:48
问题 Please do not mark it as a duplicate question because the solution exists for mail message, not for mailkit. I am trying to send an email to multiple addresses. I tried using the code below but I have not tried using a loop. var message = new MimeMessage(); message.From.Add(new MailboxAddress("CUBES", from)); message.To.Add(new MailboxAddress("Not Reply", fcemail)); message.Cc.Add(new MailboxAddress("Maria",CC)); message.Subject = "Approval Required for Business Case"; using (var client = new

Send a single email to multiple recipients using Mailkit or mimekit

戏子无情 提交于 2020-06-25 22:52:44
问题 Please do not mark it as a duplicate question because the solution exists for mail message, not for mailkit. I am trying to send an email to multiple addresses. I tried using the code below but I have not tried using a loop. var message = new MimeMessage(); message.From.Add(new MailboxAddress("CUBES", from)); message.To.Add(new MailboxAddress("Not Reply", fcemail)); message.Cc.Add(new MailboxAddress("Maria",CC)); message.Subject = "Approval Required for Business Case"; using (var client = new

What is the correct way to authenticate using GMail OAuth2.0 in MailKit?

不打扰是莪最后的温柔 提交于 2020-06-23 16:03:04
问题 I'm trying to use Mailkit to get emails from my Gmail: private readonly string[] Scopes = { GmailService.Scope.GmailReadonly }; private UserCredential GetGmailCredential() { UserCredential credential; using (var stream = new FileStream("client_id.json", FileMode.Open, FileAccess.Read)) { // The file token.json stores the user's access and refresh tokens, and is created // automatically when the authorization flow completes for the first time. string credPath = "token.json"; credential =

Outlook SMTP Oauth Send - Authentication Unsuccessful

本秂侑毒 提交于 2020-06-13 06:36:29
问题 I have been trying to implement email functionality in a legacy app using the Legacy Mail API to add OAuth support after getting a token through the Device Code Flow starting with the Microsoft Sample Project. Along that route I have added SMTP.Send and many other API permissions to find the missing piece. (Including { "User.Read", "User.ReadBasic.All", "SMTP.Send", "offline_access", "Mail.Send" } in fear of missing one) I have been testing with the MailKit library to build a proof of concept