All Downloads are FREE. Search and download functionalities are using the official Maven repository.

play.api.libs.mailer.MailerModule.scala Maven / Gradle / Ivy

The newest version!
package play.api.libs.mailer

import com.google.inject.AbstractModule
import com.google.inject.name.Names
import play.libs.mailer.{ MailerClient => JMailerClient }

class MailerModule extends AbstractModule {

  override def configure(): Unit = {
    bind(classOf[MailerClient]).to(classOf[SMTPDynamicMailer])
    bind(classOf[JMailerClient]).to(classOf[MailerClient])
    bind(classOf[MailerClient]).annotatedWith(Names.named("mock")).to(classOf[MockMailer])
    bind(classOf[JMailerClient]).annotatedWith(Names.named("mock")).to(classOf[MockMailer])
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy