Email agent with variable attachment name

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
adam_morris
Posts: 30
Joined: Thu Nov 25, 2004 3:07 am

Email agent with variable attachment name

Post by adam_morris »

I want to email out a report each month to a number of clients. The report will be automatically generated using the script functionality and using a variable of %mmyy% new reports will be created each month.

The problem I have is emailing these attachments out. I created a job with good action of emailing out with the attachment using the variable name but I get:

Error: Attachment file not found (C:\Host Monitor Reports\F1%mmyy%.htm)

Your documentation suggests this should work. Your help is appreciated.
Adam
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: Email agent with variable attachment name

Post by KS-Soft Europe »

adam_morris wrote:Error: Attachment file not found (C:\Host Monitor Reports\F1%mmyy%.htm)
You should use the following expression to make it work:

Code: Select all

C:\Host Monitor Reports\F1%mm%%yy%.htm
Regards,
Max
adam_morris
Posts: 30
Joined: Thu Nov 25, 2004 3:07 am

Post by adam_morris »

Thanks - that did the trick.

The other problem I have now is that the report (Log analyzer) contains gif images for the graphs in a sub folder which are not of course sent through with the *.htm report.

Other than setting up a link to a web page (which I would prefer not to do), are there any other automated ways around this?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

adam_morris wrote:Other than setting up a link to a web page (which I would prefer not to do), are there any other automated ways around this?
Probably, the best way is to copy the reports into the some folder, that is accessible via web interface and place a link to the report ito the mail body. However, you may try the following solution. You may use some command line compress utility, like zip.exe to compress all reports files (*.htm and *.gif) into single package and specify this zipped package as an attachment for the "Send email" action. To aply such funnctionality, you have to create a *.bat file, that should start Log Analyzer's script to create a report and start a zip.exe (or other) utility to compress all report files into single package, with date variables in its name. You may shedule "Execute External program" action to start foregoing .bat file using built-in "Scheduler" ("Options" -> "Scheduler")

Regards,
Max
Post Reply