6 Replies Latest reply: May 15, 2014 10:08 AM by Olly Bond RSS

    VBScript Issues

    Bill Watson

      Hi

       

      Up until recently we have been using BLAT.EXE in some of out postprocess scripts to effect the emailing of outputs as attachments. Unfortunately some of our process outputs are quite large and are causing BLAT to fail, leaving the process hanging.

       

      In order to get around this I built a process using VBscript which connects to a specific Lotus Notes mail file and sends the attachments via Notes, rather than BLAT's method of using SMTP.

       

      The vbscript is called with a parameter which relates to a file containing details of the subject, message, recipients, attachment etc. This runs fine when executed directly from a command prompt, via a batch file, when called via a windows scheduled task.

       

      When I try and call this script using a Shell command in a post process however, the script fails at the point it is trying to connect to the lotus notes object.

       

      The datapump service is running under the same LAN User Account as the Windows Scheduled Tasks, and the Lotus Notes Instance.

       

      I have tried different methods of calling the script but they all fail when implemented in a post process.

       

      Can anyone give me a push in the right direction - i am just about ready to pull out my last few remaining locks of hair...

        • VBScript Issues
          Bill Watson

          no thoughts anyone?

            • VBScript Issues
              Bill Watson

              I feel very alone here

               

              Anyway I gave up on the whole running vbscript and converted the whole process to a vb.net function in the Global script - meant i had to mess about with interop assemblies and the fantastic callbyname function but it works..

               

              feel free to close/lock this thread

                • VBScript Issues
                  Olly Bond

                  Hello Bill,

                   

                  I'm sorry I didn't post or PM - it's been manic here - but you're not alone. We've had issues with DataPump jobs that are doing a lot of email distribution at the end of a process, where DataPump can't get enough of a grip on our Notes SMTP server, and I was thinking about introducing BLAT or something similar.

                   

                  It would be nice if perhaps a future version of DataPump had its own simple mail relay which would allow the Dispatcher to hand the job over to another program and then allow DataPump to get on with its job.

                   

                  Datawatch support offered us a KillProcess.exe which gracefully kills hanging Dispatcher processes, but that's a bit like using weedkliller on a flowerbed...

                   

                  Best wishes,

                   

                  Olly

                    • VBScript Issues
                      Bill Watson

                      thanks for the feedback olly. i guess i was just getting frustrated - it's what i get for being at the bleeding edge of system integration lol

                       

                      out of interest are you able to install the notes client on your datapump box?

                       

                      The reason I ask is that after i gave up on the vbscript option, I managed to get a vb.net function working in the global script that uses interop.lotus.dll. This allows me to connect to an actual notes mail file and send items via automation.

                       

                      the benefits i can see for us so far

                       

                      - emails are sent to internal notes addresses rather than smtp addresses (e.g bill.watson@anyaddress.com[/email]). For us this also means we don't fall foul of one of our mimesweeper settings where mail with large attachments are deferred for sending overnight

                       

                      - code automatically tries to connect to main notes server, if it cannot connect there, it tries the failover server.

                       

                      - code can handle To, CCTo and BCCTo addresses

                       

                      - code can handle attaching specific files, all the files in a folder, files matching patterns, or any combination of these.

                       

                      - no longer reliant on a unsupported application

                       

                      - easy to customise

                       

                      If this sounds like it might be useful, I can try and pull something together to post on here over the next couple of weeks.

                        • VBScript Issues
                          txstar _

                          I am quite an amateur at all things technical, but I know what I want!  And one of them is to run reports from Monarch & have them emailed automatically.

                          I would be very interested to know how you use vb.net function to accomplish this.  I don't even know the jargon, but I can get my IT guy to help interpret.

                          So if you were thinking anyone might enjoy seeing how you did this, I do, for one!

                          Thanks.

                            • VBScript Issues
                              Olly Bond

                              Hello TxStar,

                               

                              Essentially, there are two ways open to you. Either use Monarch and something like BLAT.exe to manage the mailing aspect, and script it yourself, or use DataPump. Which one is best depends on your budget, your IT environment, and who is going to be supporting the processes. DataPump offers lots of other features - monitored processes, SQL Server integration, multiple processor support, etc - but if it's just email you need, then there are alternatives.

                               

                              Best wishes,

                               

                              Olly