I was wondering if it is possible to get the URL of an Email I am fetching via JavaMail.
In the Gmail Webapp I have e.g. an URL of the following type:
https://mail.google.com/mail/u/0/#inbox/14e0bbd1484a035a
I have build successfully an imap connection to the mailfolder and get the subject, body etc.
mailSubject = msg.getSubject();
Can I also get the URL from the Email with the same Message object?
Thank you!
You can derive the URL from Gmail unique message ID (not to be confused with IMAP unique ID):
1504408783077114714
becomes 14e0bbd1484a035a
).