User Tools

Site Tools


dev:email

Testing email interactions in a development environment

Evergreen sends emails as part of several of its processes. If you are working with one of these processes, and want to validate your changes locally, you have several options.

The easiest option: using a localhost email address and mutt

  1. As the root user (or with sudo): install mutt (apt-get install mutt)
  2. As root, make sure that sendmail is running (`service sendmail start` and `service sendmail status`)
  3. Set the recipient email address to opensrf@localhost (for example, if you are testing a message sent to patrons, set your test patron's email address to opensrf@localhost)
  4. Run the process that you'd like to check the email output of.
  5. As the opensrf user, run `mutt`.
  6. Use the mutt inbox to check if your email came through, and if it looks as expected. Mutt displays the commands to interact with your inbox at the top of the screen.

Option 2: exim

Exim has an easy setup in debian, with the exim configure script. For testing purposes, set the email address to be your own.

Option 3: postfix

If you have access to your postfix production configuration, you can tweak it for your development environment.

dev/email.txt · Last modified: 2022/10/24 22:54 by sandbergja

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.