Sukhbir Kalsi
Sukhbir Kalsi

Reputation: 3

MailKit C# "MyExampledomain:DummyPerson <[email protected]>" results in empty from address

MailKit C# MyExampledomain:DummyPerson <[email protected]> results in empty "From" address

I am using Mailkit library (C#) to retrieve emails via IMAP

The code below gives empty "From" address.

foreach (var item in Folder)
{
    // retrieve From Address
    var FromAddress = item.From.ToString();
}

Upvotes: 0

Views: 49

Answers (1)

jstedfast
jstedfast

Reputation: 38608

If the "name" component of an email address contains a ':', then it NEEDS to be quoted. This is not a MimeKit/MailKit bug, it is the email specifications that demand this.

Upvotes: 0

Related Questions