SMS Text from a file

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
vieceev
Posts: 9
Joined: Thu May 03, 2007 3:12 am

SMS Text from a file

Post by vieceev »

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
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

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:

Code: Select all

<<IncludeFile=%FileName%>>
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
vieceev
Posts: 9
Joined: Thu May 03, 2007 3:12 am

Post by vieceev »

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:

Code: Select all

<<IncludeFile=%FileName%>>
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
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).

Rgds
Erich
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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 :roll:

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
vieceev
Posts: 9
Joined: Thu May 03, 2007 3:12 am

Post by vieceev »

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 :roll:

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 !!

Erich
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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
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.
If your cell phone provider has SMTP->SMS gate, such e-mail can be translated into SMS.

Regards
Alex
vieceev
Posts: 9
Joined: Thu May 03, 2007 3:12 am

Post by vieceev »

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 manual
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.
If your cell phone provider has SMTP->SMS gate, such e-mail can be translated into SMS.

Regards
Alex
Thx. Alex - it works as you said - only in mail. Thx a lot for your help and for your patience.

Erich
Post Reply