public class SMTPSession extends NativeObject
Constructor and Description |
---|
SMTPSession() |
Modifier and Type | Method and Description |
---|---|
int |
authType()
Returns authentication type.
|
void |
cancelAllOperations()
Cancels all queued operations.
|
SMTPOperation |
checkAccountOperation(Address from)
Returns an operation to check whether the credentials of the account are correct.
|
ConnectionLogger |
connectionLogger()
Returns the connection logger.
|
int |
connectionType()
Returns connection type (clear-text, SSL or STARTTLS).
|
protected void |
finalize() |
java.lang.String |
hostname()
Returns the SMTP server hostname.
|
boolean |
isCheckCertificateEnabled()
Returns whether the certificate of the server should be checked.
|
boolean |
isOperationQueueRunning()
Returns whether the operation queue is running.
|
SMTPOperation |
loginOperation()
Returns an operation to authenticate.
|
SMTPOperation |
noopOperation()
Returns a SMTP NOOP operation.
|
java.lang.String |
OAuth2Token()
Returns the OAuth2 token.
|
OperationQueueListener |
operationQueueListener()
Returns the IMAP operations queue listener.
|
java.lang.String |
password()
Returns the password.
|
int |
port()
Returns the port.
|
SMTPOperation |
sendMessageOperation(Address from,
java.util.List<Address> recipients,
byte[] messageData)
Returns an operation to send a message.
|
SMTPOperation |
sendMessageOperation(byte[] messageData)
Returns an operation to send a message.
|
void |
setAuthType(int authType)
Sets the authentication type.
|
void |
setCheckCertificateEnabled(boolean enabled)
Sets whether the certificate of the server should be checked.
|
void |
setConnectionLogger(ConnectionLogger logger)
Sets the connection logger.
|
void |
setConnectionType(int connectionType)
Set connection type (clear-text, SSL or STARTTLS).
|
void |
setHostname(java.lang.String hostname)
Sets the SMTP server hostname.
|
void |
setOAuth2Token(java.lang.String token)
Sets the OAuth2 token.
|
void |
setOperationQueueListener(OperationQueueListener listener)
Sets the IMAP operations queue listener.
|
void |
setPassword(java.lang.String password)
Sets the password.
|
void |
setPort(int port)
Sets the port.
|
void |
setTimeout(long seconds)
Sets network timeout in seconds.
|
void |
setUseHeloIPEnabled(boolean enabled)
Sets whether it should use the IP address while using EHLO.
|
void |
setUsername(java.lang.String username)
Sets the username.
|
long |
timeout()
Returns network timeout in seconds.
|
boolean |
useHeloIPEnabled()
Returns whether it should use the IP address while using EHLO.
|
java.lang.String |
username()
Returns the username.
|
clone, initWithNative, readObject, toString, writeObject
protected void finalize() throws java.lang.Throwable
finalize
in class NativeObject
java.lang.Throwable
public void setHostname(java.lang.String hostname)
public java.lang.String hostname()
public void setPort(int port)
public int port()
public void setUsername(java.lang.String username)
public java.lang.String username()
public void setPassword(java.lang.String password)
public java.lang.String password()
public void setOAuth2Token(java.lang.String token)
public java.lang.String OAuth2Token()
public void setAuthType(int authType)
AuthType
public int authType()
AuthType
public void setConnectionType(int connectionType)
ConnectionType
public int connectionType()
ConnectionType
public void setTimeout(long seconds)
public long timeout()
public void setCheckCertificateEnabled(boolean enabled)
public boolean isCheckCertificateEnabled()
public void setUseHeloIPEnabled(boolean enabled)
public boolean useHeloIPEnabled()
public void setConnectionLogger(ConnectionLogger logger)
public ConnectionLogger connectionLogger()
public void setOperationQueueListener(OperationQueueListener listener)
public OperationQueueListener operationQueueListener()
public boolean isOperationQueueRunning()
public void cancelAllOperations()
public SMTPOperation loginOperation()
public SMTPOperation sendMessageOperation(byte[] messageData)
public SMTPOperation sendMessageOperation(Address from, java.util.List<Address> recipients, byte[] messageData)
public SMTPOperation checkAccountOperation(Address from)
public SMTPOperation noopOperation()