Community contributed extensions

Postmark module

Postmark module enables easy integration with postmarkapp.com for handling outgoing emails.

Sending emails can be a hassle. You need to follow best practice in order to avoid spam filters and it is hard to create you own system that track delivery status etc.

Here is how they describe it (from their landing page):

Postmark enables web applications of any size to deliver and track transactional email reliably, with minimal setup time and zero maintenance. We’re the experts at getting your emails to the inbox, so you don’t have to be.

Enable and configure the module

NOTE: You need to create an account @ postmarkapp.com to be able to use this module. Read more about it here.

Add the following dependency to /conf/dependencies.yml:

- play -> postmark 1.0

Now sync dependencies and module will be downloaded:

play deps --sync 

As of Play 1.2.4 you may add flag --forProd to exclude docs and sample app from module:

play deps --sync --forProd

Configuration

Add following properties to /conf/application.conf:

# Enter you API-key from postmark here
postmark.apiKey=YOUR-API-KEY-HERE
# This email must be a valid "sender signature"
[email protected]

If you don’t want to run full integration, i.e. not sending actual emails just make sure that your data is valid, in dev/test mode you may utilize postmarks test key:

postmark.apiKey=POSTMARK_API_TEST
%prod.postmark.apiKey=YOUR-API-KEY-HERE
# This email must be a valid "sender signature"
[email protected]

The plugin will check if test key POSTMARK_API_TEST is used and log messages if that is the case.

Usage

Use any of the PostmarkSender.sendMail(...) methods. This will create a new job and send mail async.

Example:

PostmarkSender.sendMail("[email protected]", "Important!", "Luke, I am your father. \n\nKindly, Darth");