javamail connecting to gmail, expunging messages in Sent Mail does not fully delete the message

11 Views Asked by At

I am using the jakarta flavor of javamail, connecting to gmail.

After I send a message with gmail using javamail, I then delete matching messages from Sent Mail and then run an expunge operation on the Sent folder. This works on Sent, but the message is still in the All Mail folder. The All Mail folder is HUGE, so searching it for the same messages with javamail is VERY slow. As it is, the search on Sent is taking over three minutes, and there are about ten times as many messages in All Mail. A process that takes 30 minutes or more to run is impractical to run every 15 minutes.

Is there any way, maybe in settings for my gmail account, to make it so that when the message is expunged from Sent, it also gets expunged from All Mail?

0

There are 0 best solutions below