| Constructor and Description |
|---|
MailSession() |
| Modifier and Type | Method and Description |
|---|---|
void |
endSession()
End the currently running mail session and disconnect from server
|
javax.mail.Folder |
getInbox()
Get the inbox from the currently connected mail server
|
boolean |
isConnected()
Check if this mail session is connected to any mail server
|
boolean |
startNewMailSession(EMailCredentials credentials)
Set up connection to an email service with given parameters
|
public javax.mail.Folder getInbox()
throws javax.mail.MessagingException
javax.mail.MessagingException - if folder couldn't be found or couldn't be openedIllegalStateException - if session is not connectedpublic boolean startNewMailSession(EMailCredentials credentials)
credentials - the mail credentialspublic boolean isConnected()
@PreDestroy public void endSession()
Copyright © 2018. All rights reserved.