I am trying to use the plugin to send emails:
https://github.com/playframework/play-mailer
I followed the instructions found on github: added a dependency for 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 its use were not found.
How to do it?
Note: the plugin is loaded correctly (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 only contain:
1500:com.typesafe.plugin.CommonsMailerPlugin
UPDATE: I downloaded a sample project from https://github.com/playframework/play-mailer and tried to compile using sbt. This is not the same problem.
source share