diff --git a/mailer/README.md b/mailer/README.md index f44cb31..3b587e9 100644 --- a/mailer/README.md +++ b/mailer/README.md @@ -10,7 +10,7 @@ play 2.0.x: play 2.1.x: -* add ```"com.typesafe" %% "play-plugins-mailer" % "2.1-RC2"``` to your dependencies (```project/Build.scala```) +* add ```"com.typesafe" %% "play-plugins-mailer" % "2.1.0"``` to your dependencies (```project/Build.scala```) and then @@ -76,4 +76,4 @@ Copyright 2012 Typesafe (http://www.typesafe.com). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/mailer/project/Build.scala b/mailer/project/Build.scala index d1c8750..ec8c1a0 100644 --- a/mailer/project/Build.scala +++ b/mailer/project/Build.scala @@ -4,7 +4,7 @@ import Keys._ object MinimalBuild extends Build { - lazy val buildVersion = "2.1.0" + lazy val buildVersion = "2.1.1" lazy val playVersion = "2.1.0" lazy val typesafeSnapshot = "Typesafe Snapshots Repository" at "http://repo.typesafe.com/typesafe/snapshots/" @@ -13,7 +13,7 @@ object MinimalBuild extends Build { lazy val root = Project(id = "play-plugins-mailer", base = file("."), settings = Project.defaultSettings).settings( version := buildVersion, - scalaVersion := "2.10.0", + scalaVersion := "2.10.2", publishTo <<= (version) { version: String => val nexus = "http://typesafe.artifactoryonline.com/typesafe/" if (version.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "maven-snapshots/") @@ -24,7 +24,7 @@ object MinimalBuild extends Build { javacOptions ++= Seq("-source","1.6","-target","1.6", "-encoding", "UTF-8"), javacOptions += "-Xlint:unchecked", libraryDependencies += "play" %% "play" % playVersion % "provided", - libraryDependencies += "org.apache.commons" % "commons-email" % "1.2", + libraryDependencies += "org.apache.commons" % "commons-email" % "1.3.1", libraryDependencies += "com.typesafe" %% "play-plugins-util" % buildVersion ) } diff --git a/mailer/src/main/scala/com/typesafe/plugin/MailerPlugin.scala b/mailer/src/main/scala/com/typesafe/plugin/MailerPlugin.scala index 7fc2d78..139aaa9 100644 --- a/mailer/src/main/scala/com/typesafe/plugin/MailerPlugin.scala +++ b/mailer/src/main/scala/com/typesafe/plugin/MailerPlugin.scala @@ -66,7 +66,7 @@ trait MailerAPI extends MailerApiJavaInterop { /** * Sends an Html email based on the provided data. * - * @param bodyText : pass a string or use a Play! text template to generate the template + * @param bodyHtml : pass a string or use a Play! text template to generate the template * like view.Mails.templateText(tags). * like view.Mails.templateHtml(tags). * @return @@ -196,7 +196,7 @@ trait MailerBuilder extends MailerAPI { /** * Sends an Html email based on the provided data. * - * @param bodyText : pass a string or use a Play! text template to generate the template + * @param bodyHtml : pass a string or use a Play! text template to generate the template * like view.Mails.templateText(tags). * like view.Mails.templateHtml(tags). * @return @@ -235,8 +235,8 @@ class CommonsMailer(smtpHost: String,smtpPort: Int,smtpSsl: Boolean, smtpTls: Bo e("header-") foreach (e => email.addHeader(e.split("-")(0), e.split("-")(1))) email.setHostName(smtpHost) email.setSmtpPort(smtpPort) - email.setSSL(smtpSsl) - email.setTLS(smtpTls) + email.setSSLOnConnect(smtpSsl) + email.setStartTLSEnabled(smtpTls) for(u <- smtpUser; p <- smtpPass) yield email.setAuthenticator(new DefaultAuthenticator(u, p)) email.setDebug(false) email.send diff --git a/util/src/main/scala/com/typesafe/plugin/package.scala b/util/src/main/scala/com/typesafe/plugin/package.scala index a80bdd7..bb11c83 100644 --- a/util/src/main/scala/com/typesafe/plugin/package.scala +++ b/util/src/main/scala/com/typesafe/plugin/package.scala @@ -10,7 +10,7 @@ package object plugin{ */ def use[A <: Plugin](implicit app: Application, m: Manifest[A]) = { - app.plugin[A].getOrElse(throw new RuntimeException(m.erasure.toString+ " plugin should be available at this point")) + app.plugin[A].getOrElse(throw new RuntimeException(m.runtimeClass.toString+ " plugin should be available at this point")) } /**