public class EmailServiceFactory extends Object
| Modifier and Type | Method and Description |
|---|---|
InboundEmailService |
getInboundService(String hostAndPort,
InboundEmailProtocol protocol,
String secret)
Creates a new instance of specific inbound email service that is intended to work with given email server
based on given protocol.
|
static EmailServiceFactory |
getInstance()
Gets the singleton instance of this factory.
|
OutboundEmailService |
getOutboundService(String hostAndPort,
OutboundEmailProtocol protocol,
String secret)
Creates a new instance of specific outbound email service that is intended to work with given email server
based on given protocol.
|
public static EmailServiceFactory getInstance()
public InboundEmailService getInboundService(String hostAndPort, InboundEmailProtocol protocol, String secret)
hostAndPort - the host name or IP-address of inbound email server. The port number also can be specified
here if it's different from default.The default port number is depends on specified
protocol.protocol - the InboundEmailProtocol representing supported by this email library protocol that
is necessary to use for interaction with inbound email server.secret - the secret information necessary for authentication on inbound email server. Usually it's a
JSON string with username and password.public OutboundEmailService getOutboundService(String hostAndPort, OutboundEmailProtocol protocol, String secret)
hostAndPort - the host name or IP-address of outbound email server. The port number also can be specified
here if it's different from default. The default port number is depends on specified
protocol.protocol - the OutboundEmailProtocol representing supported by this email library protocol that
is necessary to use for interaction with outbound email server.secret - the secret information necessary for authentication on outbound email server. Usually it's a
JSON string with username and password.Copyright © 2023. All rights reserved.