pgMail is a small Tcl-based script that you can store within any PostgreSQL
database. Once it is stored there, you can create any number of specialized
procedures to send email from directly within PostgreSQL. For example, you can
email a customer when product ships. It is particularily helpful in a
heterogeneous systems environment, or when many different kinds of applications
may modify one database.