jstedfast / MimeKit

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

Home Page:http://www.mimekit.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plus adressing support

djeman opened this issue · comments

Hi,

I tried to use plus addressing on the latest version (mimekit 4.3.0) and when I load my email in the MimeMessage object, all the part beginning at the plus character to @ was removed from the receiver field.

Have you planned to add the support for this feature or maybe I forgot an option ?

Thanks

I'm not sure I understand what you are describing. I think what you are asking for is support for addresses like djeman+mimekit@example.com, but MimeKit already allows that.

MimeKit doesn't do anything special with it, but that's why +-style addresses are designed, so that no email library has to add any sort of special handling for it. It's all handled by SMTP servers.

Yes it's that, I want to read it with imap protocol on gmail.

I have no problem to get the message but inside the mimemessage object there is no trace of the plus part.
I tried to use WriteTo to get the eml and the plus part not exists anymore.
On gmail when I receive the message I see the plus part in the "To:" field and inside the original message too.

But now I'm in week end and I have the problem at work with one guy of my dev team.
Monday I can share the code used to get the message.

I suspect the issue is that the IMAP server is stripping out the + part, because MimeKit/MailKit shouldn't be stripping it as far as I can tell (there's definitely no intentional logic to strip it and I'm not sure how it could happen).

That said, I'll leave this open until we can get confirmation.

Are you looking at the list of addresses contained in the IMessageSummary.Envelope? Or in the MimeMessage.To/From/Cc/Bcc lists? It might make a difference only because the Envelope data structure contains pre-parsed address lists provided as tokens by the IMAP server and the server might be stripping out the + components in the pre-parsed tokens that it sends as part of its response to MailKit's FETCH query.

Yes you are right, plus addressing works fine.
I'm really sorry, you can close the request ... I failed my code review.

After your answer I tried on my pc and the result is perfect, as the original.

Thanks for your faster answer, your very good libraries and sorry for the inconvenience.

No worries.