A Non-blocking “Email sending” functionality in Scala


Knoldus

In our last blog “Adding an Email Sending Functionality in Play using Scala” we explained how to include an Email sending functionality in a Play Scala Application. But the way in which we implemented it, made it a Blocking one i.e., application will wait until email has been sent.

In this blog we will explain, how to make the Email Sending functionality a Non-blocking one. By making it non-blocking, the application will not wait until email is sent & will move on to the next step.

To make this functionality a Non-Blocking one, just make following changes in the mailSendingApp we posted earlier:-

1) Import following packages in Application.scala file

2) Add following code to Application.scala file

Note – To download the App with changes just click here.

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s