views:

74

answers:

1

Hi,

I'm currently creating mail application for my project, and I'm currently trying to figure out, how mail application like gmail, moves all the messages of particular email address, which I clicked as spam into the spam folder at runtime whenever that marked spam address send messages again. What configuration they do? I want to enable this functionality in my application, how can I do this? I'm creating my application using Javamail api.

+1  A: 

They quite certainly filter E-Mails at the time they are received. They would have some kind of trigger or hook that checks each E-Mail for validity. If the mail server / API your application works with does not offer that kind of functionality, you will probably have to poll the E-Mail inbox on a regular basis, checking against a blacklist of banned mail addresses. I don't know javamail though, so maybe somebody has more specific for that.

Pekka