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
Email agent with variable attachment name
-
- Posts: 30
- Joined: Thu Nov 25, 2004 3:07 am
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Re: Email agent with variable attachment name
You should use the following expression to make it work:adam_morris wrote:Error: Attachment file not found (C:\Host Monitor Reports\F1%mmyy%.htm)
Code: Select all
C:\Host Monitor Reports\F1%mm%%yy%.htm
Max
-
- Posts: 30
- Joined: Thu Nov 25, 2004 3:07 am
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?
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?
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
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")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?
Regards,
Max