0

How in JavaMail do i get UID of message sent by function transport.sendMessage()?

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
R_K
  • 31
  • 1
  • 3
  • Do you want the Message-ID? MimeMessage has the method: getMessageID() – Ulf Jaehrig Dec 13 '11 at 16:30
  • SLaks, if "Emails don't have UIDs", how is it possible that in JavaMail is function called getMessageByUID? :) – R_K Dec 13 '11 at 17:59
  • Ulf Jaehrig, but is it possible to get message by the Message-ID? I can get message by UID: Message message = folder.getMessageByUID(678) where 678 is UID. But the problem is that i don't know UID of message which I sent, so my question was "How do get UID of sent message?" :) – R_K Dec 13 '11 at 18:20
  • Those are for _incoming_ messages. – SLaks Dec 14 '11 at 00:21
  • You're right. So after sending the message should i read again UIDs and names of all messages from the mailbox and then compare all this names with the name of the message which I have sent? – R_K Dec 14 '11 at 13:07

0 Answers0