I am trying to use the play plugin for sending emails:
https://github.com/playframework/play-mailer
I have followed the instructions as found on github: added the dependency to build.sbt, created play.plugins with the specified content (do I need to register the file somehow)?
but I get a compilation error:
object mailer is not a member of package play.api.libs
when trying to import
import play.api.libs.mailer._
I get another compilation error on
val mail = use[MailerPlugin].email
MailerPlugin and use are not found.
How to get this working?
Note: the plugin is correctly downloaded (I can find it in my .ivy2 directory), but it is not listed as a dependency in my application.
My build.sbt file:
name := ...
version := "1.0-SNAPSHOT"
scalaVersion := "2.11.2"
resolvers += Resolver.typesafeRepo("releases")
//"mysql" % "mysql-connector-java" % "5.1.31"
libraryDependencies ++= Seq(
"mysql" % "mysql-connector-java" % "5.1.24",
"org.webjars" %% "webjars-play" % "2.3.0-2",
"com.typesafe.play" %% "play-slick" % "0.8.0",
"com.typesafe.play.plugins" %% "play-plugins-mailer" % "2.3.1",
"org.mindrot" % "jbcrypt" % "0.3m"
)
fork in Test := false
lazy val root = (project in file(".")).enablePlugins(PlayScala)
And my play.plugins contains only:
1500:com.typesafe.plugin.CommonsMailerPlugin
UPDATE: I've downloaded the sample project from https://github.com/playframework/play-mailer and tried to compile using sbt. It failed with exactly the same problem.