On 03.10.2013 07:37, L. C. De Silva wrote:
Hi all,
I am interested in implementing alarm handler warnings via email and text. Is
this supported in EPICS framework? If so, can somebody point me to the
relevant information?
Thanks, Chanaka.
With StreamDevice, you can send emails. Not from the alarm handler, but from a
record. (Handle with care: SCAN=".1 second" may be a bad idea.)
All you need is access to a (not too suspicious) mail server from your IOC and a
little bit of knowledge about the sendmail protocol:
Terminator = CR LF;
ExtraInput = Ignore;
ReplyTimeout = 1000;
@mismatch { out "QUIT"; disconnect; }
mail_start {
connect 10000;
in "220";
out "HELO";
in "250";
out "MAIL FROM:\$1";
in "250";
out "RCPT TO:\$2";
in "250";
out "DATA";
in "354";
out "From: \$1";
out "To: \$2";
out "Subject: Report from \$1";
out "";
}
mail_end {
out ".";
in "250";
out "QUIT";
disconnect;
}
send {
mail_start;
out "Your problem is: %s";
mail_end;
}