Hallo,
is it possible to check if a file is aviable (eg. error.txt) and send the content of this textfile via SMS ?
Rg.
Erich
SMS Text from a file
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Hm. You may try the following trick. In mail template, assigned to the "Send Email" or "Send SMS" action, you should place the following string:
Such a directive in a mail template tells HostMonitor to insert content of the specified file into mail body. http://www.ks-soft.net/hostmon.eng/mfra ... .htm#Mails
%FileName% - is a macrovariable, that represents name of the file for the "Foder/File availability" test method: http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
Regards,
Max
Code: Select all
<<IncludeFile=%FileName%>>
%FileName% - is a macrovariable, that represents name of the file for the "Foder/File availability" test method: http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
Regards,
Max
Max, thanks - i got the message - but i dont want to see the filename.txt - i want to see the content of this file. The way you described is working - but i got an msg with "IncludeFile=test.txt" (cause the name of the file is test.txt).KS-Soft Europe wrote:Hm. You may try the following trick. In mail template, assigned to the "Send Email" or "Send SMS" action, you should place the following string:Such a directive in a mail template tells HostMonitor to insert content of the specified file into mail body. http://www.ks-soft.net/hostmon.eng/mfra ... .htm#MailsCode: Select all
<<IncludeFile=%FileName%>>
%FileName% - is a macrovariable, that represents name of the file for the "Foder/File availability" test method: http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
Regards,
Max
Rgds
Erich
Sorry for confusing.
This option implemented for "Send e-mail" action only.
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#Mails
Usually there is no much sense to send file to cell phone
Probably your cell phone provider has SMTP->SMS gate? In such case you may send SMS to cell phone using "Send e-mail" action.
Regards
Alex
This option implemented for "Send e-mail" action only.
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#Mails
Usually there is no much sense to send file to cell phone

Probably your cell phone provider has SMTP->SMS gate? In such case you may send SMS to cell phone using "Send e-mail" action.
Regards
Alex
Hi Alex, i am not sure if you understand my prob. I have to check a CONTENT of a file. If an error occours, the specific system creates a text file with an Error Message inside. This Message could be "Error 75 blabla" - and if this file is created (>then 0kb) then i must read out the content of this file and snd this info to my SMS or Mail. Thx a lot for your help !!KS-Soft wrote:Sorry for confusing.
This option implemented for "Send e-mail" action only.
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#Mails
Usually there is no much sense to send file to cell phone![]()
Probably your cell phone provider has SMTP->SMS gate? In such case you may send SMS to cell phone using "Send e-mail" action.
Regards
Alex
Erich
I understand you. You may use <<IncludeFile=path_to_the_file>> directive to send content of the file as e-mail.
Quote from the manual
Regards
Alex
Quote from the manual
If your cell phone provider has SMTP->SMS gate, such e-mail can be translated into SMS.If template is used for "Send e-mail" action, you may use special directive like <<IncludeFile=path_to_the_file>> (e.g. <<IncludeFile=c:\HostMonitor\template1.htm>> or <<IncludeFile=%CommentLine3%>>). When HostMonitor detects such directive, it inserts content of the file into mail and then resolves macro variables (it means you may use macro variables in external file as well). Please note: size of external file should not exceed 16K.
Regards
Alex
Thx. Alex - it works as you said - only in mail. Thx a lot for your help and for your patience.KS-Soft wrote:I understand you. You may use <<IncludeFile=path_to_the_file>> directive to send content of the file as e-mail.
Quote from the manualIf your cell phone provider has SMTP->SMS gate, such e-mail can be translated into SMS.If template is used for "Send e-mail" action, you may use special directive like <<IncludeFile=path_to_the_file>> (e.g. <<IncludeFile=c:\HostMonitor\template1.htm>> or <<IncludeFile=%CommentLine3%>>). When HostMonitor detects such directive, it inserts content of the file into mail and then resolves macro variables (it means you may use macro variables in external file as well). Please note: size of external file should not exceed 16K.
Regards
Alex
Erich