Home

Awesome

<img src="https://www.jcabi.com/logo-square.svg" width="64px" height="64px" />

EO principles respected here Managed by Zerocracy DevOps By Rultor.com

mvn PDD status Javadoc jpeek report Maven Central Dependencies

More details are here: email.jcabi.com. This article explains how this library was designed: How Immutability Helps.

It is an object-oriented email sending SDK for Java:

Postman postman = new Postman.Default(
  new SMTP(
    new Token("user", "password").access(
      new Protocol.SMTP("smtp.gmail.com", 587)
    )
  )
);
postman.send(
  new Envelope.MIME()
    .with(new StSender("Yegor Bugayenko <yegor@jcabi.com>"))
    .with(new StRecipient("Jeff Lebowski", "jeff@gmail.com"))
    .with(new StSubject("dude, how are you?"))
    .with(new StBCC("my-boss@jcabi.com"))
    .with(new EnPlain("Hi, long time no see! :) Check my pic!"))
    .with(
      new EnBinary(
        new File("/tmp/picture.gif"),
        "my-picture.gif",
        "image/gif"
      )
    )
);

Make sure you have these dependencies:

<dependency>
  <groupId>javax.mail</groupId>
  <artifactId>mailapi</artifactId>
  <version>1.4.3</version>
  <scope>provided</scope>
</dependency>
<dependency>
  <groupId>javax.mail</groupId>
  <artifactId>mail</artifactId>
  <version>1.5.0-b01</version>
  <scope>runtime</scope>
</dependency>

Questions?

If you have any questions about the framework, or something doesn't work as expected, please submit an issue here.

How to contribute?

Fork the repository, make changes, submit a pull request. We promise to review your changes same day and apply to the master branch, if they look correct.

Please run Maven build before submitting a pull request:

$ mvn clean install -Pqulice