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

MailKit IMAP fetch only new, not downloaded messages

i'm using MailKit to implement an IMAP email client. In the various examples i've seen that the code to fetch message headers is this one: var messages = client.Inbox.Fetch (0, -1, MessageSummaryItems.Full |…
ʞᴉɯ
  • 5,376
  • 7
  • 52
  • 89
4
votes
1 answer

How to get the message using message id in Mailkit?

I am using mail kit to send receive mail, and manage all records in my database. I am storing all user action for particular mail and then execute it using my code. I am storing message id in the table for the unique message, now I want to get the…
Jatin Patel
  • 65
  • 2
  • 7
4
votes
1 answer

How to save entire MailKit mime message as a byte array

I'm building a simple .net MailKit IMAP client. Rather then pulling emails again and again from the IMAP server, is it possible to store the entire MailKit mime message (in full, including attachments) as a byte array? If so, how? Then I could write…
penCsharpener
  • 409
  • 7
  • 15
4
votes
2 answers

AuthenticationException: AuthenticationMechanismTooWeak: 5.7.14

I am using MVC ASP.NET Core 1.1.2 on a web application. I try to create the contact form using MailKit 1.18.1.1. I send the contact forms info via email (gmail). When I build the web page locally, everything works as expected. First time I ran the…
Nebih Başaran
  • 101
  • 2
  • 12
4
votes
1 answer

MailKit: How to get the To email address when it is an alias

I am sending an email to alias@company.com which is an alias to a real mailbox address. I then connect to the real mailbox (let's say realmailbox@company.com) using MailKit and retrieve messages. When I inspect the To address, all I see is the…
Hai Vu
  • 41
  • 5
4
votes
1 answer

DKIM signing fails with body hash did not verify for Mimekit 1.10.1.0 , Mailkit 1.10.2.0

I see a strange problem while DKIM signing the headers with Mailkit & Mimekit, Gmail reports the error "dkim=neutral (body hash did not verify)". Am I doing something wrong here?.Please find my code below and screenshots of the actual received…
4
votes
1 answer

Font change and styling of HTML email body in MailKit

after allowing the access of less secure apps here I was able to send my self an email using gmail with inline styling. using MailKit.Net.Smtp; // for SmtpClient using MimeKit; // for MimeMessage, MailboxAddress and MailboxAddress var message =…
Hasan A Yousef
  • 22,789
  • 24
  • 132
  • 203
4
votes
3 answers

How to search imap inbox with mailkit based on multiple condition?

I want to search imap inbox with mailkit based on multiple condition like NotSeen & NotDeleted. I know the queries are receptively,if we do individual search query. var uids = client.Inbox.Search(SearchQuery.NotSeen); var uids =…
4
votes
1 answer

Missing attachments using Mailkit

When I receive a mail with attahcment(s) from Exchange via IMAP protocol using MailKit, it's missing the attachment. When I do: string.Format("Mail has {0} attachments", mime.Attachments.Count()) It report "0", even tho that the mail itself contain…
grmihel
  • 784
  • 3
  • 15
  • 40
4
votes
1 answer

Using MailKit, attachments with unicode file names appear as "untitled attachment" in Outlook

We are using MailKit in our application to send e-mails to users. These e-mails often have attachments with Unicode or long file names. Some e-mail clients, such as Outlook (when using POP or IMAP) or Outlook Express, cannot handle RFC 2231, and the…
TomTee
  • 91
  • 9
4
votes
2 answers

Export EML from Email using MailKit

I need to export an EML file from IMAP using Mailkit, however there are no methods to export the emails. I didn't find any documentation either in MimeKit - Mailkit Documentation. Is it possible to export EML files using Mailkit?
BrunoMartinsPro
  • 1,646
  • 1
  • 24
  • 48
4
votes
1 answer

Using Mailkit to save attachments using IMAP

I have a need to find a particular email on a Google IMAP server and then save the attachments from the email. I think I have it all figured out except for the part of determining what the file name is of the attachment. Below is my code so far, I…
TheEdge
  • 9,291
  • 15
  • 67
  • 135
4
votes
1 answer

How can I delete a message by message id with MailKit POP3 client?

I want to use the MailKit Pop3Client to retrieve messages from a POP3 mailbox, and then delete these messages after processing. The retrieval code is something like: Public Function GetMessages(Optional logPath As String = Nothing) As List(Of…
ProfK
  • 49,207
  • 121
  • 399
  • 775
4
votes
2 answers

How to get a list of UIDs in reverse order with MailKit?

I would like to get the latest 100 UIDs from the inbox using MailKit. I am accessing a Gmail mailbox which does not appear to support the SORT extension so I am unable to use OrderBy. Here is my code. The problem is that it appears to retrieve the…
mike nelson
  • 21,218
  • 14
  • 66
  • 75
4
votes
1 answer

How to delete messages in Gmail (not move to Trash folder) using MailKit

I'm trying to develop an ImapClient using the MailKit library. How can I permanently remove messages from a Gmail account as opposed to simply moving them to the Trash folder?
Timbioz
  • 175
  • 3
  • 8