smiley22 / S22.Imap

A free, easy-to-use and well-documented .NET library component for communicating with IMAP servers
http://smiley22.github.com/S22.Imap/Documentation/
MIT License
210 stars 112 forks source link

unique id #145

Open lea-lam opened 6 years ago

lea-lam commented 6 years ago

what is the uniqeid it fixed in all sessions? i can view it in mail source

mmoo9154 commented 6 years ago

@lea-top, I'm not sure which uniqueid you are asking about...

The UID for email messages is generated by the IMAP server when a new message is received. The S22.Imap ImapClient does not have any control over that value. You might want to read through section 2.3.1.1 of RFC 3501 for the details.[1]

The UID of a mesage is fixed in all sessions and for all time. It is assigned at the time the message is created in a particular mailbox, and it NEVER changes.

You seem to ask "Can I view it [the message UID] in mail source?"

You will receive the UID when you call StoreMessage(), StoreMessages(), or Search(). UID's are just uint, so you can view them. You also receive UID's if you register event handlers for the MessageDeleted or NewMessage events.

The UID is not stored in the "mail source". (I am assuming you mean the body of the email message as transmitted over the wire.)

If you are asking about some other "mail source" please help me understand where you are thinking about.

[1] https://tools.ietf.org/html/rfc3501#section-2.3.1.1