public Task<ImapImplementation> IdentifyAsync( ImapImplementation clientImplementation, CancellationToken cancellationToken = default )
|ObjectDisposedException||The ImapClient has been disposed.|
|ServiceNotConnectedException||The ImapClient is not connected.|
|NotSupportedException||The IMAP server does not support the ID extension.|
|OperationCanceledException||The operation was canceled via the cancellation token.|
|IOException||An I/O error occurred.|
|ImapCommandException||The server replied to the ID command with a NO or BAD response.|
|ImapProtocolException||An IMAP protocol error occurred.|
Passes along the client implementation details to the server while also obtaining implementation details from the server.
If the clientImplementation is null or no properties have been set, no identifying information will be sent to the server.
This command has the danger of violating the privacy of users if misused. Clients should notify users that they send the ID command.
It is highly desirable that implementations provide a method of disabling ID support, perhaps by not calling this method at all, or by passing null as the clientImplementation argument.
Implementors must exercise extreme care in adding properties to the clientImplementation. Some properties, such as a processor ID number, Ethernet address, or other unique (or mostly unique) identifier would allow tracking of users in ways that violate user privacy expectations and may also make it easier for attackers to exploit security holes in the client.