Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Maven Central javadoc jooby-commons-email website

commons-email

Email supports via Apache Commons Email.

Small but helpful module that provides access to Email instances.

exports

  • SimpleEmail
  • MultiPartEmail
  • HtmlEmail

dependency

<dependency>
  <groupId>org.jooby</groupId>
  <artifactId>jooby-commons-email</artifactId>
  <version>1.5.0</version>
</dependency>

usage

application.conf:

 mail.hostName = smtp.googlemail.com
 mail.ssl.onConnect = true
 mail.username = username
 mail.password = password
 mail.from = [email protected]
 mail.subject = TestMail
{
  use(new CommonsEmail());

  get("/send", req -> {
    require(SimpleEmail.class)
       .setMsg("you got an email!")
       .setTo("[email protected]")
       .send();
  });
}

That's all it does! Every time you require an email, it creates one and setup properties from mail.*.

commons-email.conf

These are the default properties for commons-email:

mail {

  charset: ${application.charset}

  debug: false

  sendPartial: false

  smtpPort: 25

  starttls: false

  # SSL

  ssl.smtpPort: 465

  ssl.onConnect: false

  # advanced

  socketConnectionTimeout: 60s

  socketTimeout: 60s

}