PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, July 12, 2022

[FIXED] How to skip emails in copy operation for INBOX folder when emails already exist in java ?

 July 12, 2022     imap, jakarta-mail, java, message     No comments   

Issue

I want to copy message from source mail server to destination mail server. i used imap protocol and javamail. For first stage, i copy message and there is not any problem. Again i copy message the already message dose not overwrite or skip copy. I want to skip message in inbox folder in the destination folder. I do not like delete source message. Thanks.


Solution

The most efficient way is to keep track of the UIDs of the messages from the source folder that you've already copied, so you don't copy them again. Depending on how you're doing the copying, you may only need to keep track of the last UID you copied, and then only copy messages with larger UIDs (newer messages). See the UIDFolder interface.



Answered By - Bill Shannon
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing