The OMERO server has the ability to send email to any users who have a properly configured email address. OMERO system administrators can then use the omero admin email command to contact those users.
In order to activate the subsystem, minimally the omero.mail.config property will need to be activated.
Note
A current limitation of the system is that emails are not in a queue and therefore if you log out or otherwise lose your OMERO session before the server has finished sending, the action will abort without completing.
$ bin/omero config set omero.mail.config true
By default, this will use “localhost” as the mail server on port 25 and send as the user “omero”. Likely you will need to configure OMERO to use your actual mail server.
For example:
$ bin/omero config set omero.mail.host smtp.university.example
If authentication is required, then also configure:
$ bin/omero config set omero.mail.username USER
$ bin/omero config set omero.mail.password PASS
For any user to receive email, a valid email address must be configured. By default, the root OMERO user will not have an email address configured. This can be done from one of the UIs or via the omero obj command:
$ bin/omero obj update Experimenter:0 email=root@university.example
Note
Using a mailing list or an alias for the root user can simplify configuration.
A number of “mail senders” are available for sending notifications of certain events on the server. Those available include:
ServerUpMailSender and ServerDownMailSender which mail when the server goes up or down
FailedLoginMailSender which can be configured to send for particular users if a bad password is used
To activate the senders, the etc/blitz/mail-senders.example can be copied to a file ending with ”.xml”.
OMERO.web will email the users listed in the omero.web.admins whenever the application identify broken link (HTTP status code 404) or raises an unhandled exception that results in an internal server error (HTTP status code 500). This gives the administrators immediate notification of any errors. The omero.web.admins will get a description of the error, a complete Python traceback, and details about the HTTP request that caused the error.
Note
Reporting errors requires property omero.web.debug set to False and works together with OMERO.web error handling.
Along with omero.mail.host, a few general connection properties may be needed for your particular SMTP server:
Note
omero.mail.from may not be necessary but some servers may require it to match username. Regardless, it can be useful to inform users more clearly of who is getting in touch with them.
All properties can be found under the Mail section of Configuration properties glossary.
Finally, if the above mail configuration properties do not cover your needs, you can add your own implementation as described under Extending OMERO.server. The related property is omero.mail.bean:
$ bin/omero config set omero.mail.bean myMailImplementation