public interface Mail
Depending on whether it's multipart or not (i.e. created with mail(true) or
mail(false)) certain methods will throw UnsupportedOperationException. A non-multipart message
doesn't support:
plain(String), html(String), body(BodyType, String).
attachment(InputStreamSupplier, String, String), inline(InputStreamSupplier, String, String)
(and other variants of these methods).
Minimal usage example:
MailSystem mailSystem = ... ;
mailSystem.mail()
.from("me@example.com")
.to("you@example.com")
.subject("Hello there")
.html("<p>Hey hey hey</p>")
.send();
MailSystem| Modifier and Type | Field and Description |
|---|---|
static Encoding |
DEFAULT_ATTACHMENT_ENCODING |
static Encoding |
DEFAULT_BODY_ENCODING |
static Charset |
DEFAULT_CHARSET |
static final Charset DEFAULT_CHARSET
static final Encoding DEFAULT_BODY_ENCODING
static final Encoding DEFAULT_ATTACHMENT_ENCODING
Mail priority(int priority)
Mail address(AddressType type, Iterable<String> addresses)
Mail address(AddressType type, String[] addresses)
Mail address(AddressType type, String addresses)
Mail address(AddressType type, String address, @Nullable String personal)
Mail attachment(InputStreamSupplier content, String name, @Nullable String type)
Mail attachment(InputStreamSupplier content, String name)
Mail inline(InputStreamSupplier content, String id, @Nullable String type)
Mail inline(InputStreamSupplier content, String id)
Mail send()
Mail writeTo(OutputStream outputStream)
Copyright © 2015. All rights reserved.