0
votes

I have two issues and they are very related.

  1. I can access my gmail inbox account using gmail4j, however when I create a Folder of messages, it only retrieves the emails that were sent to me. It never shows the emails I replied back to. Like, I have one multi-email, where 5 emails were sent to me but there were 2 that I replied back to. I can see the 5 emails perfectly but cannot see the 2 emails.
  2. In my Sent mail, same issue; I can retrieve all emails I sent but not the ones that were replied back.

Is there any method specifically in Javamail that allows me to bypass this? I've been looking at the Message class and Folder class but can't find anything!

Edit: I'll try to clear it up. Let's say I was emailing Person B. B emails me first, so it is in my inbox. Then I send a reply back. In the inbox of Gmail, both emails joined together in a conversation (since sender and subject is the same). However, with javamail, I can only see the first email (that B sent) in my inbox while my reply back is in my sent box. Is there anyway I can gather both of these emails together as a conversation?

I need all the emails sent by me as well as any that were replied to and while I have all the emails sent by me, I can't seem to get all the emails that were replied to.

1

1 Answers

0
votes

Are you looking for the original messages, to which you replied? Or are you looking for the reply messages that you sent? The original messages will still be in one of your mailboxes unless you deleted them. Perhaps you moved them out of your INBOX to another mailbox? The replies you sent should be in the Sent mailbox.

Note that Gmail doesn't really have "mailboxes" in the IMAP sense. Gmail tags look like IMAP mailboxes.