Mark email as spam from within WorldClient

You can edit the WorldClient templates so that users can mark mail as spam for the bayesian learning program to train from.  (Note that MDaemon 9.5+ has built-in support for this in the Lookout and Simple themes.) 

The idea is to have two separate delete buttons, one for normal 'delete' and the other for 'delete-as-spam'. The delete-as-spam button will move the mail from the user's mailbox into the SpamFilter training folder for False Negative.

This example is for the Globe theme but can be altered to be used with other themes. Also, this example uses the same delete button that is already present. If desired you can create your own delete-as-spam button and use that for clarity.

Changes to make:

 In Template/Globe/TopFrame.html:
    Under the line starting with:
        <A HREF=''javascript:Post('Delete')''>
    Add this line:
        <A HREF=''javascript:DeleteAsSpam()''><IMG
        SRC=''<$THEME$>/deletemsg.gif'' WIDTH=''31''
        HEIGHT=''33'' HSPACE=''2'' ALIGN=''top'' BORDER=''0''
        ALT=''Delete as SPAM''></A>

  In Templates/Globe/List.html:
    Somewhere in the <script></script> section add this function:
        function DeleteAsSpam() {
          var Folder = 'Drafts';       // Change this folder name to your
          var Form = document.forms[0];// SPAM folder
          Form.action += '&Move=Yes&DestFolder=' + Folder;

This function/button could also be duplicated for use for ham. Just duplicate everything, then change:

Form.action += '&Move=Yes&DestFolder=' + Folder;
from 'Move' to 'Copy' and change the Folder to the ham folder. 


Additional Comments

This type of configuration should be used with caution as the bayesian program cannot account for user error. If someone marks a message as spam, this will train the bayes program for all users in MDaemon to think of that message as spam.

Template customization is only available in MDaemon Pro.