No announcement yet.

E-Mail Trigger Script has no values

  • Filter
  • Time
  • Show
Clear All
new posts

    E-Mail Trigger Script has no values


    Been running your email scripts for quite a while. Last night I attempted to set up a triggered process to handle my router logs. I configured the router to send the logs, with records embedded in the body of the email messages, hourly. I set the TriggerScript value to "1" and let things run overnight.

    There are two mailboxes configured in my system. I received beaucoup messages from the router, as expected. In my HS log the TriggerScript - Test entries appear, but almost none of them have any values appended after the test text. I say almost because one of the log entries(TriggerScript - Total Messages) had the Sender value from a message to one of the mailboxes. I'm using the VB version of the script without any modifications since installation.

    Any thoughts about how I should troubleshoot this problem? It looks like the variables are being passed empty or not being passed at all. I recently upgraded from to 2.3 and did not reinstall any plug-ins, so I'm wondering if there is something missing in the installation.

    Thanks, in advance, for your help.

    Michael Davis


    Are you using the latest version of my script?...I seem to remember there was an issue with lost parameters in earlier versions, however I'm still at work so cannot check at the moment.

    Also what exactly are you trying to achieve with the trigger script?


      Thanks, Jon. The CheckEmailPOP_V3_HS2.vben script is dated 8/31/2008.

      I want the take the messages from my router and store the body text in an Access db so I can manage the records. I plan to modify your trigger script to take the passed values and parse the text into records, then insert them into the db. I will evaluate each message to be sure it's one that I'm interested in storing, then process the message body. What I'm really looking for is any DHCP activity that would indicate a computer has attached to my network.

      Thanks for your help.




        I do not think that is the latest version. If you go to the checkpop.ini and look under [Data] you will see the version number. If it is not 3.0.26, please upgrade so I know you are working with the same version as me.

        I enabled the triggerscript and this is the result of your notification from the message board in my log:

        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Total Messages in mailbox: 3
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Mailbox number: 1
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Message number: 3
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Email address to:
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Email name to: Jon00
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Email address from:
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Email name from: HomeSeer Message Board
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Email date: Tue 25 Nov 2008 12:26:19 -0500
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Email subject: Reply to thread 'E-Mail Trigger Script has no values'
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Email size: 3
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Email filecount: 0
        25/11/2008 17:30:09 ~!~Jon00_Email~!~TriggerScript Test - Email filenames:

        Let me know what fields are missing (once you have upgraded).


          I forgot. Please delete/move/rename the two triggerscript versions in the scripts directory before you upgrade just to make sure that is not the issue.


            Thanks, as always. The current version seems to have fixed the problem of no passed values. I didn't see your second post until I spent a good deal of time debugging the parsing of the DATA value. I've made the TXT version work, and am working on the VB version.

            I work in VBS, so learning to modify your VB script is my current challenge.

            Thanks, again.




              As a side note, you can use the mailbox number and message number to gain access to the text file that holds the parsed body information should you wish to go down that route i.e.

              BodyFilePath=hs.GetAppPath & "\data\email\EmailReadMB" & Mailboxnumber & "_" & MessageNumber & ".txt"


                That is the key I was looking for in my approach. I just want to get all the log records from the router and stick them in an MDB for processing. The log sends many <CRLF> delimited records in each email message. Using the body text file is probably the easiest solution. I will check each message for the appropriate Subject line, then get the file and parse it into database records. I assume I can then delete the message via your code.

                I continue to struggle with .VB versus VBScript, but that's my learning process.

                Thanks, Jon.



                  You can delete emails on detection of a text string within the subject using entries in the ini file similar to:

                  Subject="Log Files"


                  As this is the LAST process in the email scripting, the triggerscript will act on the body text file before it is deleted.