Overview#
PvMail watches (monitor) an EPICS PV and send an email when the value of that PV changes from 0 to 1.
The PV being watched (that triggers the sending of the email) can be any EPICS record type or field that results in a value of 0 (zero) that changes to 1 (one). This includes these EPICS records (and possibly more): ai, ao, bi, bo, calcout, scalcout, swait, …
When an event causes an email to be triggered, PvMail will retrieve the value of another PV that is the first part of the message to be sent. Additional metadata will be appended to the message.
Note
Email is sent using either a call to a configured SMTP server or
the sendmail
program on the native OS.
The sendmail protocol is only supported on Linux systems
that provide a sendmail
program.
The SMTP protocol is more general but requires valid credentials
on the SMTP server and the credentials must be stored
in a local configuration file.
PvMail provides either a command-line interface or a graphical user interface. Both are accessed from the same command, using different command-line options. The command-line version is intended to run as a background program, it has no user interaction but logs all its output into a log file. The GUI version provides a screen to edit each of the parameters before the background process is started. It also provides buttons to start and stop the background process.
Details#
There are now several parts to the PvMail support package.
command |
section |
description |
---|---|---|
|
runs the graphical user interface |
|
|
runs the command line interface |
|
|
prints the name of the configuration file |
|
|
tests the emailer and configuration file |
One-time steps#
Before you can run pvMail, you need to configure it.
First, run:
pvMail_mail_config_file
if you have not already created a configuration file. This command will create the file (if it does not exist) and then print its name to the console.
Edit this file for the particulars of how you want to send your email. Refer to the ini_config Module section for additional details about the configuration file.
Next, run:
pvMail_mail_test joeuser@example.com
(use your own email address, not Joe’s) to test that an email can be sent using your configuration. Refer to the mailer Module section for additional details about sending email. Run this tool any time you suspect that you cannot send email.
Routine usage#
You can run pvMail either in command-line mode (foreground or background) or in GUI mode. Follow the links above for more details about each.