public interface SMTPMailServer extends MailServer
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SMTP_PORT
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getDebug()
Whether logging is enabled.
|
PrintStream |
getDebugStream()
Where debug logs currently go to.
|
String |
getDefaultFrom() |
String |
getJndiLocation() |
String |
getPrefix() |
boolean |
isRemovePrecedence() |
boolean |
isSessionServer() |
boolean |
isTlsRequired() |
void |
quietSend(Email email)
Deprecated.
Use
send(com.atlassian.mail.Email) instead and deal with the Exception for yourself. Since v2.5. |
void |
send(Email email)
Sends the given email.
|
void |
sendWithMessageId(Email email,
String messageId)
Sends the given email using the given Message-ID header.
|
void |
setDebug(boolean debug)
Enable or disable SMTP-level logging.
|
void |
setDefaultFrom(String from) |
void |
setJndiLocation(String jndiLocation) |
void |
setPrefix(String prefix) |
void |
setRemovePrecedence(boolean precedence) |
void |
setSessionServer(boolean sessionServer) |
void |
setTlsRequired(boolean tlsRequired) |
getDescription, getHostname, getId, getMailProtocol, getName, getPassword, getPort, getProperties, getSession, getSocksHost, getSocksPort, getTimeout, getType, getUsername, setDebugStream, setDescription, setHostname, setId, setLogger, setMailProtocol, setName, setPassword, setPort, setProperties, setSocksHost, setSocksPort, setTimeout, setUsername@Deprecated static final String DEFAULT_SMTP_PORT
String getDefaultFrom()
void setDefaultFrom(String from)
String getPrefix()
void setPrefix(String prefix)
boolean isSessionServer()
void setSessionServer(boolean sessionServer)
String getJndiLocation()
void setJndiLocation(String jndiLocation)
boolean isRemovePrecedence()
void setRemovePrecedence(boolean precedence)
void send(Email email) throws MailException
For backward-compatibility, this method will ignore any Message-ID header set in the email parameter, and let JavaMail set its own Message-ID, then populate the header in the email parameter.
email - the Email to send.MailException - if the email could not be sentsendWithMessageId(com.atlassian.mail.Email, String)void sendWithMessageId(Email email, String messageId) throws MailException
Note that this is an advanced method and should only be used if you understand the requirements and restrictions as per RFC 2822; namely that the message-ID must be globally unique and can only contain certain ASCII characters.
If the given messageId parameter is null, then we let JavaMail create a Message-ID. Note that (for back-compatibility reasons) the email.getMessageId() is ignored for input, but set with the actual Message-ID used.
email - the Email to send.messageId - the desired Message-ID header, or null to let JavaMail create one automatically.
Do not include the angle-brackets - these will be added automatically.MailException - if the email could not be sentsend(com.atlassian.mail.Email)void quietSend(Email email) throws MailException
send(com.atlassian.mail.Email) instead and deal with the Exception for yourself. Since v2.5.email - MailExceptionvoid setDebug(boolean debug)
setDebug in interface MailServerdebug - Turn debugging on or offboolean getDebug()
getDebug in interface MailServerPrintStream getDebugStream()
boolean isTlsRequired()
void setTlsRequired(boolean tlsRequired)
Copyright © 2018 Atlassian. All rights reserved.