@Immutable public interface Postman
The best way to use it is to make an instance of
Postman.Default:
Postman postman = new Postman.Default(
new SMTP(
new Token("user", "password").access(
new Protocol.SMTPS("smtp.gmail.com", 587)
)
)
);
postman.send(
new Envelope.MIME(
new Array<Stamp>(
new StSender("Yegor Bugayenko <yegor@jcabi.com>"),
new StRecipient("Jeff Lebowski <jeff@gmail.com>"),
new StSubject("dude, how are you?"),
new StBCC("my-boss@jcabi.com")
),
new Array<Enclosure>(
new EnPlain("Hi, long time no see! :) Check my pic!"),
new EnBinary(
new File("/tmp/picture.gif"),
"my-picture.gif",
"image/gif"
)
)
)
);| Modifier and Type | Interface and Description |
|---|---|
static class |
Postman.Default
Default postman.
|
static final Postman CONSOLE
void send(Envelope env) throws IOException
env - Envelope to sendIOException - If failsCopyright © 2012–2017 jcabi.com. All rights reserved.