How to get the unique message ID while reading mails using mailMessage (System.Net.Mail.MailMessage)?

For every email , there is a unique message ID, So how do we get the unique message ID while reading mails using mailMessage(System.Net.Mail.MailMessage) ?

Thanks!

use this

mail as (System.Net.Mail.MailMessage) Variable.

mail.Headers(“UID”)

This Will work for You.

2 Likes

Thanks Himanshu, it worked.