Author |
|
klint Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 30 January 2006 at 11:06pm | IP Logged
|
|
|
hi
i'm using mailbee now i'm doing how to filter the junk mails.if u don't mind give me some code how to findout junk mails
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 31 January 2006 at 11:36am | IP Logged
|
|
|
Filtering junk mail is rather administrative than programming task. You do not need to write any code with MailBee for this.
There is no "function" which detects whether mail is junk or not. This is because spam mails are very different, spam sources constantly change, etc.
To filter spam, you should expoit some kind of system which can track spam database, learn itself, etc. There are lots of such anti-spam filters available on the market today (shareware, freeware, etc). Many of this tools can work in the following way: once installed, this tools monitors all incoming POP3 traffic and automatically removes junk mails.
This means you will not need to do anything/write any code with MailBee to filter junk mails. They will be removed automatically, and MailBee will receive and display only solicited mails.
Another option is to use mail server's junk mail filtering. If your mail server is capable of filtering spam, you can either configure it to remove any junk from your inbox or assign special headers to your junk mails.
If latter, junk mails will stay in your inbox but they will be marked in a special way. If this is a case, you can indeed filter them with MailBee. However, this greatly depends on which headers are set by your server. One common way is to set X-Spam header. If your mail server uses this approach, you can filter junk mails using the code like below:
Code:
...
Set Msg = POP3.RetrieveSingleMessage(1)
If Msg.GetHeader("X-Spam") = "Probable Spam" Or Msg.GetHeader("X-Spam") = "Suspicious" Then
MsgBox "This message is junk"
Else
MsgBox "This message is OK"
End If
|
|
|
Regards,
Alex
|
Back to Top |
|
|