• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get ESMTP ID using Javamail?  RSS feed

Ganapathi Srinivasan
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question:

There is an API in JavaMail - public String getMessageID() throws MessagingException in javax.mail.internet.MimeMessage. This API is supposed to return the message ID on the mail message that was created.

After I send the email out, I called this API and I got the message in the form of:


But this is not the ESMTP ID that is needed to track the email all the way till the mailhub. Note that the ESMTP ID generated by the SMTP server for this email was i4IIq8NO915787.

My question - is there any way by which I can programmatically retrieve the ESMTP ID from the sent email, using Javamail?

Thanks and Regards
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!