简体   繁体   中英

DKIM using MIMEKIT

Im trying to DKIM sign all my emails using MIMEKIT and it works flawless for email body of smaller lenght but when content/size of email body increases., DKIM fails. Im generating the body using "BodyBuilder".

The following are my doubts in MIMEKIT

Is there any limitation in body/content length?. Is it Mandatory to give both text and html format of the content for DKIM sign?

Below is my code for reference:

var message = new MimeMessage();
message.From.Add(new MailboxAddress("Sender", "abc@xyz.com"));
message.To.Add(new MailboxAddress("Mr K", ""k@abc.com"));
message.Subject = "Hi";
message.Sender = new MailboxAddress("realsender", "realsender@rtg.com");
message.InReplyTo = "realsender@rtg.com";
var builder = new BodyBuilder();
builder.TextBody = strbodytxt;
builder.HtmlBody = strbody;
builder.Attachments.Add(strattachmentpath);
message.Body = builder.ToMessageBody();

Is there any limitation in body/content length?

No.

Is it Mandatory to give both text and html format of the content for DKIM sign?

No.

Make sure you are using the latest version of MimeKit as there have been a number of bug fixes to DKIM signing.

If you are already using the latest version, please file a bug report with some sample code that fails.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM