How to use play-plugins-mailer with Play 2.3 and Scala 2.11?

后端 未结 2 1491
心在旅途
心在旅途 2021-01-05 12:35

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: adde

相关标签:
2条回答
  • 2021-01-05 13:14

    The README is up to date with the latest development (upcoming version). As of 19/12/2014, the latest version released and available in the Typesafe repository is 2.3.1. If you want to use this version you need to refer to the README in the v2.3.1 tag: https://github.com/playframework/play-mailer/tree/v2.3.1

    For the upcoming version we have decided to break compatibility to move the Play mailer into its own package and provide a better implementation. That's the reason why the documentation in the master branch is not working with version 2.3.1.

    0 讨论(0)
  • 2021-01-05 13:29

    It looks like the problem is somehow with the version of plugin that is available in the typesafe repo:

    I've built the plugin from sources, published it to my local repository and then everything compiled fine.

    In the build.sbt of the sample app there is:

    resolvers += Resolver.file("LocalIvy", file(Path.userHome + File.separator + ".ivy2" + File.separator + "local"))(Resolver.ivyStylePatterns)
    

    So it looks like the authors also had problems in compiling the app using the plugin deployed to the official repository.

    UPDATE: Well, it compiled fine, but then failed at runtime with java.lang.ClassNotFoundException: com.typesafe.plugin.CommonsMailerPlugin

    UPDATE 2: The sample play.plugins is also wrong, the correct one should be:

    1500:play.api.libs.mailer.CommonsMailerPlugin
    

    and then eveyrthing finally works

    0 讨论(0)
提交回复
热议问题