Adding an Email sending functionality in Play using Scala

To provide an Email Sending functionality in your Play App that is being built with Play 2.2.1, follow these steps ( this post summarizes the work done step by step).

1) Add following dependency in build.sbt (or in Build.scala for Play 2.1.x or older versions)

“com.typesafe” %% “play-plugins-mailer” % “2.1-RC2”

2) Add following lines to “conf/application.conf” file

3) Create a new File in conf folder with name “play.plugins” and add following line into it

1500:com.typesafe.plugin.CommonsMailerPlugin

4) Delete all the code in “Application.scala” and write following code to it

5) Delete the code written in views/index.scala.html and write the following code to it

These are the steps to add Email sending functionality in Play using Scala.

Note – For a Demo you can download the Demo App from

https://github.com/gupta-himanshu/himstein/tree/master/mailSendingApp

Written by 

Himanshu Gupta is a lead consultant having more than 4 years of experience. He is always keen to learn new technologies. He not only likes programming languages but Data Analytics too. He has sound knowledge of "Machine Learning" and "Pattern Recognition".He believes that best result comes when everyone works as a team. He likes listening to Coding ,music, watch movies, and read science fiction books in his free time.

1 thought on “Adding an Email sending functionality in Play using Scala

Leave a Reply

%d bloggers like this: