Questions tagged [mailkit]

MailKit is a cross-platform .NET mail-client library optimized for mobile.

MailKit is a cross-platform .NET mail-client library optimized for mobile, it is built on top of MimeKit.

785 questions
2
votes
2 answers

Serilog WriteTo.Email() failing

This is a .Net Core 6 console application that uses Serilog.Sinks.Email 2.4.0. In the same project I am referencing the MailKit 3.1.0 Nuget package. I notice that Serilog.Sinks.Email also references Mailkit 3.1.0. I'm configuring the Logger like so.…
Tom Regan
  • 3,580
  • 4
  • 42
  • 71
2
votes
2 answers

Method Verify mailkit

How to run Verify the existence of a mailbox address.? http://www.mimekit.net/docs/html/M_MailKit_Net_Smtp_SmtpClient_Verify.htm using (var client = new SmtpClient()) { client.Connect("smtp.mail.ru", 465, true); …
xASZx
  • 35
  • 3
2
votes
1 answer

Is it possible to modify/Append a mail without downloading the whole message by using MailKit?

Imagine a mail server that supports attachments in the range of 400-500 mb. Or Imagine a mail that is 30 mb, but has 10 attachments - if we have to download the whole message each time we wish to remove an attachment from it, that's a 300 mb…
SpiritBob
  • 2,355
  • 3
  • 24
  • 62
2
votes
1 answer

How to save all messages to a single .mbox file using Mailkit / MimeKit IMAP?

I have been looking for an example of how to save all messages to a single file like a .mbox file and have been unsuccessful. Here is some code that i have tried but is not currently working. var exportStream = new MemoryStream(); foreach (var uid…
AdamH409
  • 83
  • 1
  • 8
2
votes
0 answers

Office 365 - MailKit hitting spam folders c#

I am trying to use MailKit for sending email via office 365 for a web app that I am currently developing. I have had various issues in the past with office 365 and sending emails and this evening I have stumbled across multiple articles and stack…
Simon Price
  • 3,011
  • 3
  • 34
  • 98
2
votes
1 answer

MailKit: The handshake failed due to an unexpected packet format

I got exception when I try to connect to my SMTP server using MailKit SmtpClient. BUT my mails have been sent successfully if I use System.Net.Mail.SmtpClient with the same parameters! The exception message: An error occurred while attempting to…
Palindromer
  • 854
  • 1
  • 10
  • 29
2
votes
0 answers

Authenticate with Oauth2 to read IMAP in C# MVC web-application

I would like to read e-mails from a signed in user using IMAP. I have created a console application for testing purposes and making sure the app-registration settings in azure are correct. The console application is working as intended. A Microsoft…
abc54
  • 63
  • 2
  • 6
2
votes
1 answer

How do we store a user's GMail OAuth access token with Mailkit in an ASP.NET Core web site?

I've trying to use Mailkit and OAuth to read a user's Gmail inbox, and have followed the sample code found in the Mailkit FAQ. For the record, here is the code I'm using... Note that I'm currently storing the token in a file in the site's content…
Avrohom Yisroel
  • 8,555
  • 8
  • 50
  • 106
2
votes
0 answers

Why am I not receiving the Original-Envelope-Id header in the delivery status emails?

I am creating 2 desktop applications in c # with netframework 4.7. In one application I am sending mail by smtp to the outlook server of 365, and in another I am reading the mail through imap. I'm using @jstedfast 's MailKit library and I'm…
Marlonchosky
  • 494
  • 5
  • 16
2
votes
0 answers

Mailkit connect to Office365 programmatically

I need to get emails from my Office365 account programmatically (C#). I decided to use Mailkit and to create an application password on Azure portal. I registered a new app, set its Redirect Uri and gave it some permissions: I then created a client…
Kidservice
  • 103
  • 1
  • 9
2
votes
2 answers

Prevent Exchange 2013 from converting message body text/plain to HTML

I'm using MailKit v2.8 to parse data out of emails in using IMAP to connect to a Microsoft Exchange 2013 account. The body of messages being sent to my Exchange inbox will be "text/plain" 100% of the time. This process works completely fine for new…
2
votes
3 answers

Outlook SMTP Oauth Send - Authentication Unsuccessful

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…
2
votes
3 answers

MailKit smtp.office365.com special character encoding issue

First, I do not know if my issue come from a bad use of Mailkit (that is a great piece of software, by the way) or a miss-configuration of smtp.office365.com. Version of MailKit is: 2.6.0 I try to send a message with this string Test d'ênvoïe…
Waldo
  • 1,070
  • 1
  • 11
  • 30
2
votes
3 answers

MailKit gets an SslHandshakeException with LetsEncrypt SSL certificates

I have a server (Centos 7) setup to be used as mail server. Using postfix/dovecot/opendkim/opendmarc.. It works as it should, users are able to connect their emails using gmail for example. Able to send and receive mail. Also when I use MailKit…
Somaar
  • 135
  • 2
  • 8
2
votes
2 answers

Are there known mail client applications that built on top of MailKit library?

MailKit is a great library but I don't know any mail client that uses it. Is there a list of apps that are built on top of MailKit?
ekalchev
  • 762
  • 7
  • 24