Mail Thorn ---------- Author: Gabrielle Allen, Tom Goodale Date: February 2001 Why --- We want to be able to information users by Email about the state of the simulation, in this way the Email thorn would act as an information server. For example: - simulation started - reached iteration number # - HTTPD URL - Streaming HDF5 connection details - Norm of a Grid function - jpg of a 2D slice - simulation finished - someone steered a parameter - disk space is getting low Ideas ----- 1) Include as attachments - parameter file - output file so far - output data files - jpegs of 2D slices/isosurfaces 2) Could send emails to a group server to automatically log parameter files and runs Functionality ------------- 1) Thorns need to be able to contribute information to the message 2) Need to be able to include attachments Implementation -------------- Probably need two thorns, one utility thorn which does Emailing providing a function like Email(char *send_address,char *return_address,char *subject, char *message,attachments????) And one thorn InfoEmail to gather the information 1) Pull Mode --------- Thorns register a function with InfoEmail which will return a string with the information which they wish to contribute, at the iteration, to an Email message. InfoEmail_RegisterProvider( (* ForEmail)(char *message)) (pointers here obviously not right, what about attachments) InfoEmail calls each of these functions each timestep to see if there is anything to send around in an email message (or maybe also a parameter to say how often to do this, but then could miss information from the thorns). 2) Push Mode --------- Thorns call InfoEmail to provide information for that iteration number, InfoEmail sends mail at POSTSTEP if there is anything to send. InfoEmail_Publish(char *message) This thorn would call Email to send its built up message. Sending Mail ------------ Either look for sendmail/mail/Mail whatever using autoconf (one problem is that even if these are present it doesn't necessarily mean that mail will be send), or write own emailer. Questions --------- 1) Haven't really thought about how to add attachments 2) Would also be nice to send mail everytime a parameter is steered, but how would you know this. 3) Can we make this a generic description for an information server ... that is, can there be a common API for this and HTTPD.