See: Description
| Interface | Description |
|---|---|
| SendInterceptor |
An extension point that supports intercepting commands and data before they are sent.
|
| Class | Description |
|---|---|
| CompositeSendInterceptor |
A chain of
SendInterceptor instances that will call each other in turn. |
| EhloResponse |
The parsed response to the EHLO command.
|
| SmtpClientResponse |
Wraps the session and the responses to one or more SMTP commands.
|
| SmtpSession |
An open connection to an SMTP server which can be used to send messages and other commands.
|
| SmtpSessionConfig |
Immutable implementation of
AbstractSmtpSessionConfig. |
| SmtpSessionConfig.Builder |
Builds instances of type
SmtpSessionConfig. |
| SmtpSessionFactory |
Creates
SmtpSession instances by connecting to remote servers. |
| SmtpSessionFactoryConfig |
Immutable implementation of
AbstractSmtpSessionFactoryConfig. |
| SmtpSessionFactoryConfig.Builder |
Builds instances of type
SmtpSessionFactoryConfig. |
| Utf8SmtpRequestEncoder | |
| Utf8SmtpResponseDecoder |
| Enum | Description |
|---|---|
| Extension |
An Extended SMTP feature.
|
| Exception | Description |
|---|---|
| ChannelClosedException | |
| MessageTooLargeException |
Unchecked exception thrown when the provided content is too large to be sent according to
the server's EHLO response.
|
| NoopErrorResponseException |
Unchecked exception thrown when an error was received in response to a NOOP command.
|
| ResponseException | |
| SmtpException |
A base exception that incorporates a connection ID into the exception message.
|
To connect to a remote server:
SmtpSessionFactoryConfig to define application-wide settings
SmtpSessionFactory constructor to create a factory
SmtpSessionConfig to specify the address of a remote server
SmtpSessionFactory.connect(com.hubspot.smtp.client.SmtpSessionConfig) with
this configuration
Once you have an active session, you can send emails:
SmtpSession.send(io.netty.handler.codec.smtp.SmtpRequest) with an EHLO command
SmtpSession.startTls() if TLS is supported
SmtpSession.send(java.lang.String, java.lang.String, com.hubspot.smtp.messages.MessageContent) or
one of its overloads.
Copyright © 2018. All rights reserved.