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
3
votes
1 answer

Mailkit authenticating self hosted email with my exchange server?

Essentially, I have a local mail server with exchange and active directory and etc.. I'm trying to authenticate an email with Mailkit in C# but I get an authentication error every single time. I've tried many different ways of using…
sethsource
  • 185
  • 9
3
votes
1 answer

What is the relationship between OAuth2 and MFA

This is my first question on the Stackoverflow. I have already read the https://stackoverflow.com/help/how-to-ask section and I have read and read and read over the internet to find the connection between OAuth2 and MFA. Which made me more confused.…
3
votes
1 answer

how to send embedded images with MailKit?

I followed this guide to try and embed 2 images on Emails this is my code written in C# for a console application: the ExecuteSendMailEx procedure: public void ExecuteSendMailEx(AccesBase accesBase, string From, string Subjet, bool Format, string…
bargo
  • 57
  • 9
3
votes
1 answer

Exception trying to get folder in MailKit, but not when enumerating folders first

I'm using MaikKit, and am trying to work out how to get the mail in a Jim folder I set up in a Gmail account. I tried enumerating the folders as follows... private void GetFolders() { using ImapClient client = new(); EmailAccount…
Avrohom Yisroel
  • 8,555
  • 8
  • 50
  • 106
3
votes
1 answer

C# MailKit - How to read Last Email

I wrote code to read emails with Mailkit, in the Mailkit there is a way to read first email, but i couldn't find a way to read subject of last recent email using (var client = new ImapClient()) { …
Ali Kazemi
  • 505
  • 7
  • 19
3
votes
1 answer

What is the difference between X-Priority vs Priority headers when working with SMTP?

I am using MailKit as SMTP client to send emails. I see there are two properties XMessagePriority and MessagePriority what is the difference between these two and does one override the other?
Saher Ahwal
  • 9,015
  • 32
  • 84
  • 152
3
votes
1 answer

Dns.GetHostAddressesAsync: Resource temporarily unavailable

First, for some context: I am using .NetCore to develop an API with Identity. Everything is on a Cloud server, inside a Docker. When a user is created, an email is sent to the new User using a mailkit and the webmail server through Plesk (Hosted on…
Alex Boutin
  • 157
  • 1
  • 8
3
votes
1 answer

How to send GMail/GSuite email using OAuth2 without browser popup?

Following this github article I am able to authenticate against GMail using OAuth2 and send gmail messages programmatically uisng SMTP and IMAP (clients from MailKit). The link was kindly provided by the author (jstedfast). The problem with the…
pete.a
  • 31
  • 3
3
votes
1 answer

Sending Emails with mailKit obsolete warnings with MailboxAddress(String) constructor

I have the following code that works fine sending emails, but I'm getting these warnings that say that I should label some of the methods Obsolete. I Looked at the docs on the mailKit website and it says that I should use a different constructor…
whisk
  • 713
  • 1
  • 10
  • 34
3
votes
2 answers

Send MailKit email with an attachment from memoryStream

How to send an email with an attachment from memoryStream using MailKit? Currently, I'm sending using regular SMTP and attaching the file using the below code, but couldn't find any proper example to send it using MailKit package. I have gone…
dawncode
  • 578
  • 1
  • 8
  • 22
3
votes
2 answers

ArgumentNullException for address when sending email using NetCore.MailKit

I am using NetCore.MailKit NuGet package to help me send an email which contains a link to confirm their email when the user registers. I have followed the steps on their Github page but, I am getting an ArgumentNullException for the address, even…
KB_Shayan
  • 632
  • 8
  • 24
3
votes
1 answer

Authenticating to Office 365 Outlook IMAP using MailKit fails for a specific user

For a lot of customers, we connect to the Office 365 Outlook IMAP server, and that works just fine. However, for one customer now it does not work. I can log into portal.office.com with the username and password, and go to Outlook there and see the…
Øyvind Bråthen
  • 59,338
  • 27
  • 124
  • 151
3
votes
1 answer

get text body mailkit

i'm using Mailkit to get the subject of emails , it's working for me but i need to get the text body to , any one could help me any one could help me thanks async Task FetchMessageSummariesAsync(bool print) { …
3
votes
2 answers

sent folder empty using mailkit

I am trying to get the sent folders to display but it shows that the folder has no children in it. All folders are empty except inbox. I am using the following code. using (var client = new ImapClient()) { …
user9821082
  • 31
  • 1
  • 5
3
votes
1 answer

How to read inline image in email body using Mailkit

I have sent myself a test email which has an image in the body of the email. This image is not an attachment, just pasted into the body of the email. I am using MailKit to read this incoming email, but cannot find how to access that image. I'm…
Graham
  • 7,807
  • 20
  • 69
  • 114