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

MessageSummaryItems.Id vs MessageSummaryItems.Envelope.MessageId vs MessageId.GMailMessageId vs MessageSummaryItems.UniqueId

I am using MailKit to retrive emails from a Gmail account. However, I have been confused about the Id of an email. I already looked at the documentation but could not find a complete explanation. For example, I noticed UniqueId, is actually not…
Mojtaba
  • 93
  • 6
3
votes
1 answer

MailKit - SmtpClient Connect method freezes

I'm developing a Xamarin android app where at some point (after a successful transaction) the app must send an information email to the customer. The whole process of creating the MimeMessage instance as well as the actual sending of it is done…
3
votes
1 answer

Mailkit: Is there a way to test whether a folder is Special Folder?

I am reading all the IMAP folders by recursively going through all the folders. In my UI, I would like to designate the Special Folders so that they show up at the top. Is there any property or method already available that can tell me if any…
Samuel
  • 1,949
  • 4
  • 18
  • 30
3
votes
2 answers

C# MailKit HTML email received as plain text

I have a complex email template that contains many div, section and other HTML elements. The HTML template has reference to CSS(uploaded to server). I am using the below code to send HTML email via MailKit : var message = new MimeMessage(); var…
Software Dev
  • 5,368
  • 5
  • 22
  • 45
3
votes
1 answer

How to search mails newer than a specific timestamp using Mailkit?

I am building a C# function to periodically fetch email messages from a local email server(hMailServer) and save to a database table. var uid_list = await inbox.SearchAsync(SearchQuery.SentAfter(lastDateTime)); The problem is that it ignores the…
Jiping
  • 700
  • 1
  • 9
  • 12
3
votes
1 answer

Mailkit Authentication Failure

My problem: The same code works fine in one instance but cannot authenticate with same username/password in another instance of the project. My code: static NetworkCredential _emailLoginCredentials; _emailLoginCredentials = new…
xzk
  • 827
  • 2
  • 18
  • 43
3
votes
1 answer

ASP.NET MailKit SMTP response

I have this code which has been successfully sending emails - except for the other day when it did not. Therefore, I'd like to check the SMTP response, but not sure what to do. Here is my code now: using (var client = new SmtpClient()) { …
Vasily Hall
  • 891
  • 10
  • 22
3
votes
1 answer

O365 using Mailkit to Delete mail?

I have been working on this small console app to read through a mailbox. It works fine but after it has finished reading through the mails, I want it to move them to the Deleted post folder. I found other questions related to this, but it didn't…
Pruit
  • 91
  • 4
3
votes
1 answer

get the delivery status of email with mimekit/mailkit library

I am using @jstedfast Mimekit/Mailkit library, For sending mass email from my app. I want to know how to get the delivery status of each email. This is my first try to get this and after some RnD i got that we have to set or pass…
Pooja K.
  • 97
  • 1
  • 10
3
votes
2 answers

The SMTP server has unexpectedly disconnected in MailKit

I am using mailkit to send a mail in ASP.NET Core Here is my code var emailMessage = new MimeMessage(); emailMessage.From.Add(new MailboxAddress("Gorrolo", "gorollobikes@gmail.com")); emailMessage.To.Add(new MailboxAddress("",…
Gaurav_0093
  • 1,040
  • 6
  • 28
  • 56
3
votes
1 answer

.net Core Mailkit send attachement from array

I am testing .Net Core MVC, which does not support System.Net.Mail, the only alternative I found is Mailkit, works well but can't figure out how to send attachments that I have stored in my database as binary. I used the following in MVC 5: …
hncl
  • 2,295
  • 7
  • 63
  • 129
3
votes
1 answer

ASP .NET Core using MailKit to send e-mail

public static string Send(string to, string subject, string content, string from = "") { try { MimeMessage message = new MimeMessage(); message.Subject = subject; …
Max
  • 4,439
  • 2
  • 18
  • 32
3
votes
1 answer

Sending email using resulted razor view in MailKit

Hope I can explain my request in a simple way: In .Net Core, we can display the .cshtml view, after sending the model data using View(FileName, Model). Is there a way to send the Model to the .cshtml file, so that instead of displaying the resulting…
Hasan A Yousef
  • 22,789
  • 24
  • 132
  • 203
3
votes
1 answer

Mailkit Authenticate to Imap fails

I'm trying to use MimeKit and MailKit to fetch e-mail from inbox. But the logon to the mail server Imap does not work. I'm using port 993 with ssl. I have tried to connect/LOGIN/FETCH on port 143 with Telnet and it works. I have tried to…
OleFolkersen
  • 31
  • 1
  • 1
  • 2
3
votes
1 answer

Write message to folder on the disk using MailKit

I'm trying to move an application that used System.Net.Mail over to MailKit/MimeKit. Using System.NetMail, you could write messages to a folder like so: _smtp = new SmtpClient() { DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory, …
John-Luke Laue
  • 3,736
  • 3
  • 32
  • 60