line

XMail plugin v0.10

PLUGIN FOR XLOBBY

by Dalibor Lanik

line

Remark: changes from previous version are marked in blue.


Installation:

 

  • Run installer exe

 

Notice:

·    Sample skin is provided with this plugin and automatically installed by the installer

·    This plugin was tested with the Xlobby build dated 27/06/2006 (latest as of this writing).

·      To start with the sample XMail skin, set it up as your default skin in xlobby.xml, located in XLobby root folder, typically: c:\Program Files\XLobby\. Find the line with <skin>default</skin> and replace the skin name with „XMail“ so it looks like this: <skin>XMail</skin>

  • for some functions, Xevent plugin is required

 

This plugin is based on mail.dll by Lesnikowski

http://www.lesnikowski.com/Mail/

which is free for non-commercial use and is included in this installer together with licence file.

 

Commands:

 

There are several commands in this plugin. They can be found in configuration dialog of XLobby by pressing F2, under events tab, by adding plugin command.

 

Here is the list with brief descriptions what they do:

 

GetMail                        [no parameter]

        ·              Retrieves mail from the server into the xmail.xml database. Attachments are not retrieved, only the filenames of attachments are. HTML format e-mails are cleared of forbidden XML characters.

 

CheckMail                    [overlay name]

        ·              Checks mail from the server. Just gets the number of mails that can be displayed by plugin>Xmail>Msgnr, not the mail messages. Overlay name has to be passed as parameter, so it pops an overlay if there are new mails. This command has to be triggered by you manualy.

 

CheckMailEvent           [xlobby event]

                ·              Checks mail from the server. Just gets the number of mails that can be displayed by plugin>Xmail> Msgnr, not the mail messages. Xlobby event has to be passed as parameter, so it executes it via Xevent plugin (which is required for this functionality) if there are new mails. This command has to be triggered by you manualy. Example of event: „email:notify_me“, where email is a group and notify_me is command in XLobby.

 

CheckerOn                   [overlay name]

        ·              Turns on internal plugin timer for mail checking. Overlay name has to be passed as parameter, so it pops an overlay if there are new mails. This command is triggered automatically every X seconds (as specified in the configuration dialog – more on this below).1

 

CheckerOnEvent          [xlobby event]

        ·              Turns on internal plugin timer for mail checking. Xlobby event has to be passed as parameter, so it executes it via Xevent plugin (which is required for this functionality) if there are new mails. This command is triggered automatically every X seconds (as specified in the configuration dialog – more on this below). 1

 

CheckerOff                   [no parameters]

        ·              Turns off internal plugin timer for mail checking (works to stop both CheckerOn and CheckerOnEvent).

 

Clear                            [no parameter]

·              Clears variables. Needed so when you display overlay with progress info for the second time, it doesn‘t display old percentage and progress bar (from previous mail check) for a split-second, before it starts copying. Just assign this event prior to opening overlay with progress bar.

 

Notice:

1 Run only one of CheckerOn or CheckerOnEvent! J

 

Variables:

 

You can use those on text fields to display info about mail check progress:

 

plugin>XMail>Verbose                      * messages on mail download progress (text)

plugin>XMail>Percentage                * total percent finished (text)

plugin>XMail>Server                         * server (text)

plugin>XMail>Account                      * username (text)

plugin>XMail>ProgressBar             * progress bar (image)

plugin>XMail>Msgnr                          * number of new messages (as retreived by CheckMail, CheckMailEvent , CheckerOn or CheckerOnEvent commands) (text)

 

Your mail account details

 

When you first run XLobby with XMail plugin and open configuration with F2, go to plugins, select Xmail and  select "configure" button, you ‘ll get configuration dialog and you can edit your settings.

 

 

All input values are mandatory. Check SSL if your server requires SSL, check Log if you want to enable logging.

 

All values are changed immediately when OK is pressed except the “Check every … Seconds”. You need to restart Xlobby in order to change this value.

 

The values are stored in registry:

 

      HKCU\Software\Visual\XLobby\XMail

 

      The values are:

 

"Password", your password

"Server", your pop3 server

"SSL", whether your server requires SSL or not. 0 = no, 1 = yes

"Username", your username

“CheckEverySec”, specifies how often to check for new e-mails (in seconds, default 120)

"log", turn on/off logging. Default is off.

 

 

Databases

            1 database is created by XMail:

 

·      xmail.xml - contains all downloaded mails

fields imported:

§ parameter (equals to subject)

§ display (equals to subject)

§         Nr (number of mail)

§         from

§         to

§         cc

§         bcc

§         replyto

§         date (in YYYY/MM/DD HH:MM format – for better sorting)

§         subject

§         body

§         attachmentcount (number of attached files)

§         attachments (list of filenames separated by commas)

§         size (in bytes)

 

Errors and logging

 

            Errors are logged in file c:\program files\xlobby\xmail_log.txt. Full logging can be turned on by setting the „log“ checkbox in the configuration window.

 

To do:

 

            I believe the plugin is now, with the configurator dialog, pretty much complete. I will, ofcourse, fix any bugs. The only other things that come to mind which could be implemented are:

 

  • SMTP? Let’s see if anyone wants to send mails from HTPC J Send me a mail if you do…
  • HTML mail… Only if I get really bored! J

 

If you have any comments, suggestions or requests, send a post to Xlobby forum, plugins\Xmail plugin topic, or e-mail me at dalibor@lanik.org

 

Dalibor Lanik

Prague, July 2006