Announcement

Collapse
No announcement yet.

Email Access plugin for Homeseer 2.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Email Access plugin for Homeseer 2.0

    Here is a vb .net plugin that I am using in order to retrieve email from my POP server. To install this just copy the dll file to your Homeseer folder and then restart HS. Once restarted go to the Interfaces setup and enable it. It will take care of prompting you to input your pop server, port and delimiter you want to use.

    Here is a sample of how to use it:

    PHP Code:
    dim theMessages as string() = hs.GetPlugins("EMail Access").GetEmailMessages(EMAIL_USERNAMEEMAIL_PASSWORD
    The help info is below:

    PHP Code:
    The following methods can be called in the EMail Access plugin:

    name Method
    No Parameters
    Returns
    the name of the plugin

    eg
    :  Dim theName As String hs.GetPlugins("EMail Access").name

    version Method
    No Parameters
    Returns
    the version of the plugin

    eg
    :  Dim theVersion As String hs.GetPlugins("EMail Access").version

    GetEmailCount Method
    Parameter 
    #1: String theUser - The user id for the pop3 account
    Parameter #2: String thePassword - The password for the user account
    Returnsthe current number of emails

    eg
    :  Dim emailCount As Integer hs.GetPlugins("EMail Access").GetEmailCount("bmaslen","password")

    GetEmailMessages Method
    Parameter 
    #1: String theUser - The user id for the pop3 account
    Parameter #2: String thePassword - The password for the user account
    Returnsa result String Array of email messages separated by the specified delimiter in the config file

    The result string 
    array consists of the following information:

    Date/Time of email~!~From Recipient~!~To Recipient~!~CC Recipient~!~BCC Recipient~!~Subject~!~Received From Server~!~Body of Message

    eg
    :  Dim theEmailMessages As String() = hs.GetPlugins("EMail Access").GetEmailMessages("bmaslen","password"

    Enjoy!!
    Attached Files
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

  • #2
    Looks promising - some suggested improvements

    Bob,

    Thanks for posting your plugin. Some feedback for you.
    The properties of the DLL show references to hspi_DatabaseAccess (description and comments properties) - looks like a hangover from the project properties of your other plugin.

    I am really interested in using this plugin if it would support some additonal functionality I would need. I don't know how much further you want to develop the plugin but here's my wish list:

    It would be useful to be able to "interrogate" the email account and leave emails on server by providing:
    Access to multiple email accounts (across different servers)
    Ability to retrieve emails/email information by unique ID
    Ability to access email subject, sender and contents of each mail as individual perperties
    Ability to delete email by unique ID (assuming above leave the emails on the server).

    The main reason I would like to be able to access the email properties while leaving the emails on the server is that I still get to download them to my usual email client when I'm ready.

    I'm not at my main machine at the moment so have not yet been able to try your plugin (plus I'm still having some uptime problems with HS 2!) but I will give you more feedback when I've had a chance to use it.

    Regards.

    Comment


    • #3
      JimBob,

      I don't wish to steal Bobs thread but take a look here.

      Bob,

      Good work on the vb.net plugin. If it grows and has all the features of the current Freepop COM object I am using, it may be worth a re-write of my email package.
      Jon

      Comment


      • #4
        Thanks for the pointer Jon. I am already using my own custom scripts which utilise the very same FreePOP COM control.
        I am also keen to switch to a .NET dll if available with the same functionality.

        (As an aside, I have been having stability issues since upgrading to HS2 which so far have improved since I stopped using the FreePOP. Are your FreePOP scripts working ok under HS2?)

        Regards.

        Comment


        • #5
          Freepop has been 100% stable with HS2 - I have had no problems.
          Jon

          Comment


          • #6
            Hi Guys,

            Thanks for the feedback! I will definitely look into adding those enhancements for you.

            I was using the FreePop control in HS 1.7 as well and it worked great but when I converted my scripts to vb .net scripts, I could not get the FreePop control to work anymore. This is why I developed the Email Access plugin.

            I wanted to have all of my scripts run as vb .net script because they get their own thread.

            I will keep you informed on the enhancements. After this week coming up, I am off for two weeks so I should be able to get them done by then.
            Cheers,
            Bob
            Web site | Help Desk | Feature Requests | Message Board

            Comment


            • #7
              OK,

              I have added some new features to the EMail Access plugin.

              I have tried to duplicate the FreePOP control as much as I could.

              To install the new plugin you need to do the following:

              1. Unzip the hspi_EMailAccess.dll file to your Homeseer directory
              2. Unzip the EMailAccess_Help.asp file to the following directory:

              [your homeseer directory]/html/Help/EmailAccess

              where [your homeseer directory] is the directory HS is installed in (eg: C:\Program Files\Homeseer 2)

              In order to see the new features I have added, please select the EMail Access dropdown menu in the HS GUI window and choose Help. This will load up the help page and you can see all of the Method calls that can be made.

              If you go to the bottom, you will see a sample VB .net script that uses the EMail Access plugin.

              Enjoy!
              Attached Files
              Last edited by Blade; August 15th, 2005, 11:39 AM.
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


              • #8
                Cheers Bob. That's great - I look forward to giving it a go.

                However.....I'm still battling in debugging issues with HS2. I've even just re-installed XP in an attempt to give it a "fresh start". I'll let you know when I've tried your latest version.

                Regards.

                Comment


                • #9
                  JimBob,

                  I am really going to have to think about how I want to do a multi pop server version of this plugin.

                  I will give it some thought.
                  Cheers,
                  Bob
                  Web site | Help Desk | Feature Requests | Message Board

                  Comment


                  • #10
                    Would not making the mail server address as a third parameter to the methods do the trick?

                    Comment


                    • #11
                      I could probably make that work.

                      Let me see what I can do.
                      Cheers,
                      Bob
                      Web site | Help Desk | Feature Requests | Message Board

                      Comment


                      • #12
                        JimBob,

                        I have added a new Connect method that accepts four parameters. Pop server, port number, user and password.

                        This should give you what you need.

                        To install the new plugin you need to do the following:

                        1. Unzip the hspi_EMailAccess.dll file to your Homeseer directory
                        2. Unzip the EMailAccess_Help.asp file to the following directory:

                        [your homeseer directory]/html/Help/EmailAccess

                        where [your homeseer directory] is the directory HS is installed in (eg: C:\Program Files\Homeseer 2)

                        In order to see the new features I have added, please select the EMail Access dropdown menu in the HS GUI window and choose Help. This will load up the help page and you can see all of the Method calls that can be made.

                        If you go to the bottom, you will see a sample VB .net script that uses the EMail Access plugin.
                        Attached Files
                        Cheers,
                        Bob
                        Web site | Help Desk | Feature Requests | Message Board

                        Comment


                        • #13
                          Cheers Bob.

                          Still trying to track down problems with my current HS2 setup so don't want to put anything more on yet but will definitely try it when I can.

                          Regards.

                          Comment


                          • #14
                            Blade, I followed your instructions and copied the file the there directories and restatred homeseer but it does not show up to config.

                            Does it matter that my Homeseer 2.0 is in c:\programfiles\homeseer

                            Any ideas

                            Thom

                            Comment


                            • #15
                              Did you enable to plugin in the Interfaces web page?
                              Cheers,
                              Bob
                              Web site | Help Desk | Feature Requests | Message Board

                              Comment

                              Working...
                              X