SLING-5644 Provide an messaging implementation based on Commons Email

* adjust to latest Messaging API
* make MailResult public
* add test for failing transmission (authentication failure)

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1738226 13f79535-47bb-0310-9956-ffa450edef68
6 files changed
tree: 8d1ccc4f339ffabd4a58171769d014d68b8ebb1c
  1. src/
  2. pom.xml
  3. README.md
README.md

Apache Sling Commons Messaging Mail

Provide an OSGi Configuration for SimpleMailBuilder or a custom MailBuilder to send messages using Apache Commons Email.

To extend or override SimpleMailBuilder​s configuration call MessageService#send(String, String, Map):Future<Result> and supply a configuration map mail within the third parameter:

{
  "mail" : {
    "mail.subject": <String>,
    "mail.from": <String>,
    "mail.smtp.hostname": <String>,
    "mail.smtp.port": <int>,
    "mail.smtp.username": <String>,
    "mail.smtp.password": <String>
  }
}