mail

package mail

A Play 2 plugin providing a scala wrapper to simple-java-mail

Put '400:mail.MailPlugin' into conf/play.plugins to make it work.

Recognized configuration properties (to be set in application.conf):

Code snippet:

  import mail._
  import Mail._

   val attachment = Source.fromBytes("Ninja should wear black".toCharArray.map(_.toByte))
    Mail()
      .from("sender", "sender@example.com")
      .to("receiver", "receiver@example.com")
      .withSubject("A subject")
      .withText("body")
      .withAttachments(Attachment("ninja code", attachment, "text/plain")
      .send()
Visibility
  1. Public
  2. All

Type Members

  1. class Mail [FROM, TO, SUBJECT, BODY] extends AnyRef

    Mail instance builder

  2. class MailPlugin extends Plugin

    Play plugin implementation for mailer

Value Members

  1. object Mail extends AnyRef

    Provides Mail instance factory method, case classes and implicits needed to make it work

  2. object MailActor extends AnyRef

    Factory for mailer actors (MailActor and MailActorMock).