Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get ESMTP ID using Javamail?

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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic