play-plugins icon indicating copy to clipboard operation
play-plugins copied to clipboard

setFrom method unavailable in Scala

Open ghost opened this issue 11 years ago • 3 comments

I have added the plugin to my conf/play.plugins file, and I have the following in my Build.scala:

"com.typesafe" %% "play-plugins-mailer" % "2.1-RC2"

I'm using Play 2.1 with Scala 2.10

I attempt to call mail.setFrom("...") and the compiler then tells me that setFrom is not a member of com.typesafe.plugin.MailerAPI.

Here are the imports (relevant to this issue) at the top of my file:

import play.api.Play.current import com.typesafe.plugin._

I've also tried this with 2.1.0 version instead of 2.1-RC2 and I encounter the same error.

Code: val mail = use[MailerPlugin].email mail.setSubject("foo") mail.setFrom("foo") // this fails!! mail.sendHtml("foo</html")

p.s. It also says that "setRecipient" is not a member of MailerAPI.

ghost avatar Aug 09 '13 18:08 ghost

I have the same issue :/

acampagna avatar Aug 15 '13 17:08 acampagna

The master branch has a different method name. I think in your case it should be addFrom.

https://github.com/typesafehub/play-plugins/blob/statsd-2.1.1/mailer/src/main/scala/com/typesafe/plugin/MailerPlugin.scala

nraychaudhuri avatar Aug 15 '13 17:08 nraychaudhuri

Yes it's addFrom. @acampagna @wingkevin can you tell us if that works for you?

ggrossetie avatar Oct 27 '14 13:10 ggrossetie