Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/jcabi/jcabi-email

Object-Oriented Email Sending Java SDK
https://github.com/jcabi/jcabi-email

email-sending java smtp smtp-client

Last synced: about 2 months ago
JSON representation

Object-Oriented Email Sending Java SDK

Lists

README

        

[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
[![Managed by Zerocracy](https://www.0crat.com/badge/C3RUBL5H9.svg)](https://www.0crat.com/p/C3RUBL5H9)
[![DevOps By Rultor.com](http://www.rultor.com/b/jcabi/jcabi-email)](http://www.rultor.com/p/jcabi/jcabi-email)

[![mvn](https://github.com/jcabi/jcabi-email/actions/workflows/mvn.yml/badge.svg)](https://github.com/jcabi/jcabi-email/actions/workflows/mvn.yml)
[![PDD status](http://www.0pdd.com/svg?name=jcabi/jcabi-email)](http://www.0pdd.com/p?name=jcabi/jcabi-email)
[![Javadoc](https://javadoc.io/badge/com.jcabi/jcabi-email.svg)](http://www.javadoc.io/doc/com.jcabi/jcabi-email)
[![jpeek report](https://i.jpeek.org/com.jcabi/jcabi-email/badge.svg)](https://i.jpeek.org/com.jcabi/jcabi-email/)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.jcabi/jcabi-email/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.jcabi/jcabi-email)
[![Dependencies](https://www.versioneye.com/user/projects/561ac442a193340f2f0011cb/badge.svg?style=flat)](https://www.versioneye.com/user/projects/561ac442a193340f2f0011cb)

More details are here: [email.jcabi.com](http://email.jcabi.com/).
This article explains how this library was designed:
[How Immutability Helps](http://www.yegor256.com/2014/11/07/how-immutability-helps.html).

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

```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 "))
.with(new StRecipient("Jeff Lebowski", "[email protected]"))
.with(new StSubject("dude, how are you?"))
.with(new StBCC("[email protected]"))
.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:
```xml

javax.mail
mailapi
1.4.3
provided

javax.mail
mail
1.5.0-b01
runtime

```

## Questions?

If you have any questions about the framework, or something doesn't work as expected,
please [submit an issue here](https://github.com/jcabi/jcabi-email/issues/new).

## 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
```