Questions tagged [mimekit]

A cross-platform .NET MIME creation and parser library with support for S/MIME, PGP, TNEF and Unix mbox spools.

A cross-platform .NET MIME creation and parser library with support for S/MIME, PGP, TNEF and Unix mbox spools.

MimeKit is a C# library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME), as defined by numerous IETF specifications.

303 questions
1
vote
1 answer

Base64 string encoded Images not loading on the output PDF (TuesPechkin / Wkhtmltopdf)

Fair warning: This post is a bit of an essay-sized question... So let me say my thanks beforehand to whoever goes through it and tries to answer it. Context: I have been trying the only 2 free-commercial-use open-source html to pdf converting…
Mxpsth
  • 67
  • 8
1
vote
0 answers

MailKit - Send an email via PowerShell

I would like to send an email via PowerShell using nuget package called MailKit. After downloading it along with all of the package dependencies (I managed to go over the loop dependency issues) I have created a script which I hoped will send the…
Bartosz X
  • 2,620
  • 24
  • 36
1
vote
1 answer

Navigating MimeKit.MimeParser

Is it possible to read the Nth attachment of the Mth message, from an mbox file, using MimeKit.MimeParser? In my case, I would store few messages (few fields for each msg including a list of attachments) to an in-memory data structure and after…
Velja Radenkovic
  • 716
  • 1
  • 6
  • 27
1
vote
1 answer

MimeKit Remove gif images from Emails

I'm trying to strip gif images from emails in order to save storage space in Outlook and our document management system. Say for example you've got an email approx 2MB's in size and the gif is 1MB. I'm expecting the result of the file size of the…
Netstrata
  • 75
  • 1
  • 7
1
vote
1 answer

How to retrieve the content of an email's attachment just like it shows when I .ToString() it?

I can't seem to find any method that returns me just the encoded part of this e.ToString() output. ('e' is a MimeEntity with 1 singular email attachment) This is what the output looks like: X-MimeKit-Warning: Do NOT use ToString() to serialize…
Mxpsth
  • 67
  • 8
1
vote
1 answer

MimeKit Unexpected token at offset 37

We are using MailKit/MimeKit to relay emails. when try to send mail throw error like 'Unexpected token at offset 37' Please help to resolve this. Trace message as below at MimeKit.MailboxAddress.set_Address(String value) at…
Ezhumalai
  • 163
  • 1
  • 2
  • 10
1
vote
2 answers

MImekit - why do we need database to use for certificate storage and DefaultSecureMimeContext?

While I am aware this may be a silly question but if someone can provide pointers it would be really good. This is with reference to MimeKit documentation given here. http://www.mimekit.net/docs/html/Working-With-SMime.htm I can see there are…
murtazat
  • 399
  • 3
  • 12
1
vote
2 answers

Powershell and MailKit - Fails in Script

I'm attempting to use the new MailKit / Mimekit instead of Send-MailMessage in Powershell. I found Send-MailKitMessage 1.0.1 on the Powershell Gallery My needs are simple and the Powershell will be used for internal alerts only, so I simplified the…
vzmon1
  • 69
  • 5
1
vote
0 answers

SQLite is not available error on pkcs7.Decrypt() of MimeKit

I've encountered an error SQLite is not available while decrypting a mime message after executing pkcs7.Decrypt(). Please see my block of code below: public MimeEntity decryptMessage(MimeMessage message) { // Putting the value of message.body to…
ikey
  • 321
  • 4
  • 19
1
vote
1 answer

Windows Form C# Application throws Could not load File or Assembly 'Mimekit' when run on different machine

My mail-provider has made an update, which generated some problems using Dot.Net Mail in an older Windows Form C# solution. I found, that it is recommended to use MailKit/Mimekit instead of Dot.Net mail. So I decided also to upgrade to newer Visual…
Jada_DK
  • 13
  • 2
1
vote
1 answer

Build MIME message from raw email text

I need to process raw email messages and pull out the To and From addresses. I could just search for 'To: ' but I'd rather do this in a structured way to avoid issues. How can I build a MIME message from raw email text, then get the To/From…
niico
  • 11,206
  • 23
  • 78
  • 161
1
vote
1 answer

Mimekit: MailboxAddress missing for signed email attachment

Problem - Not able to retreive the email address from the attached signed email ((MimeKit.MessagePart)item).Message.To Here is the code, the saved attachments does not have the email address; but only friendly name - if…
1
vote
1 answer

Mimekit / MailKit BSMTP Files

Try to automate a process here - we have a system that generated batch SMTP files dumps them to a folder - a 3rd party .net component reads the file and then sends it along to our SMTP server. Problem is this component create and destroys a new…
1
vote
1 answer

Set Return-Path using MailKit

I came across the following thread Sending Email with return-path not functioning on how to set the From and Return-Path. I am using Mailkit, and this is what I tried: var mailMessage = new MimeMessage(); mailMessage.From.Add(new…
1
vote
1 answer

MailKit Attachment write to MemoryStream

I have to process the content of PDF files downloaded using IMAP Client. The previous solution was to save the data to a local temporary PDF file. Is it possible to use MemoryStream or some other way to avoid creating temporary files? If so, I would…
Krzysztofz01
  • 432
  • 5
  • 13