mailing

Mailing with IMAP: How to detect that a message has been moved from one folder to another?

不问归期 提交于 2019-12-04 15:49:58
Using JavaMail API and IMAP, i want to learn that a message has been moved from folder a to b. how can i do that without adding listeners? i mean i want to discover the changes of messages when i login to the account and open the folder. The problem is if you have 3 messages in folder a with ids 1 2 and 3 and you move the message with id 3 to the folder B, the id of the message changes and we have a message with id 1 in folder B. My goal is synchronizing the message structure in mail server with my own local server. I have to keep all message information, flags etc on my own. So on each login,

strategies for finding duplicate mailing addresses

落花浮王杯 提交于 2019-12-03 08:17:45
I'm trying to come up with a method of finding duplicate addresses, based on a similarity score. Consider these duplicate addresses: addr_1 = '# 3 FAIRMONT LINK SOUTH' addr_2 = '3 FAIRMONT LINK S' addr_3 = '5703 - 48TH AVE' adrr_4 = '5703- 48 AVENUE' I'm planning on applying some string transformation to make long words abbreviated, like NORTH -> N, remove all spaces, commas and dashes and pound symbols. Now, having this output, how can I compare addr_3 with the rest of addresses and detect similar? What percentage of similarity would be safe? Could you provide a simple python code for this?