# Earthworm Modules:
ewhtmlemail Overview

(last revised 7 July 2011)

This module takes reads hyp2000arc messages from an input ring and generates html alert emails containing graphical information on the corresponding earthquake. The graphical information included in each html email consists of a google map containing the locations of the hypocenter and reporting stations. Furthermore, the program tries to retrieve the waveforms for the event from one or more waveservers. These waveforms are displayed as google charts on the html email.

The figure above shows a schematic diagram of the information flow when using ewhtmlemail. The program listens for HYP2000ARC messages from an input ring (in the example, HYPO_RING). Incoming messages are processed to determine hypocenter locations and reporting stations as well as determine a suitable time interval for the traces. This information is used to request waveform data from a set of waveservers and/or winston servers. If available, tracebuf2 data will be processed together with the hypocenter information to create an html file. The html includes calls to the google maps and google charts APIs to plot a map and a set of traces, respectively. All html files are stored on a user-defined directory and named according to the event ID, as assigned by the binder. If the option to send emails is active, ewhtmlemail will add a MIME header to the html file and call the commonly available linux email program, sendmail. This will send an html email based on the created file.

Note that the generated emails do not include graphical attachments such as png or jpg images. The email contents if only text-based and graphics are provided by the calls to the google APIs. As a consequence, visualization of the alert emails requires an email client with html capability and an Internet connection.

Alternatively, the user may disable the email alerts. In this case, ewhtmlemail will not add the MIME header to the html files. This option is available for usage with a third party webserver (e.g. Apache) to monitor the events folder and publish the event information on the web.
ewhtmlemail may also be used with events detected with the Carl Johnson coincidence triggers (TRIGLIST_SCNL messages) converted using trig2arc. The figure below shows an example of the html generated by this module.

Location |
--- | ---
Origin time | 2011.07.05 01:18:24
Latitude | 0.0000
Longitude | -0.0000
Depth | 0.0
Pref. Magnitude | 0.0
Waveforms
PCND.EHZ.CP.--
PCUT.EHZ.CP.--
PLGR.EHZ.CP.--
PMAD.EHZ.CP.--

The above figure shows the general aspect of the html emails using the default settings. However, some aspects of the generated html email can be controlled changing a .css configuration file. This allows setting options such as the colors, fonts and sizes of the different elements.

ewhtmlemail has been written by Ruben S. Luis, Center of Volcanology and Geological Risks Assessment, University of the Azores.
Great ideas (such as the phase indication) and testing have been contributed by Jean-Marie Saurel, from OVSM/IPGP.

Module Index | ewhtmlemail Commands