4.5. Mail Service

The mail service acts as a Mail Transport Agent (MTA) for other WAF applications. It provides a simple mechanism to send plain or rich text messages to any entity with a valid email address. This service is not typically accessed directly, but rather is used as a building block for higher-level services such as notification. This service has no dependencies on WAF and exists primarily as a wrapper for the more cumbersome JavaMail API.

When should you use the mail service directly? If you are writing an application that sends simple plain-text alerts to users, and you do not require those alerts to be recorded in the database, then it makes sense to use the mail service. Also, if you are dealing with raw email addresses rather than WAF parties (users and groups), you probably want to use the mail service directly. Otherwise, you should consider using the higher-level notification service (see Section 4.7 Notification Service).