public final class EmailConnectionInfo extends Object
Provides the information for connection with email server.
Creating an instance:
EmailConnectionInfo info = EmailConnectionInfo.createEwsConnectionInfo(
"https://outlook.office365.com/ews/exchange.asmx",
"username",
"password",
"domain");
// or if domain is not required:
EmailConnectionInfo info = EmailConnectionInfo.createEwsConnectionInfo(
"https://outlook.office365.com/ews/exchange.asmx",
"username",
"password");
Modifier and Type | Method and Description |
---|---|
static EmailConnectionInfo |
createEwsConnectionInfo(String mailboxUri,
String userName,
String password)
Creates an instance of
EmailConnectionInfo class for Exchange Web Service. |
static EmailConnectionInfo |
createEwsConnectionInfo(String mailboxUri,
String userName,
String password,
String domain)
Creates an instance of
EmailConnectionInfo class for Exchange Web Service. |
static EmailConnectionInfo |
createImapConnectionInfo(String host,
int port,
String userName,
String password)
Creates an instance of
EmailConnectionInfo class for Internet Message Access Protocol. |
static EmailConnectionInfo |
createPopConnectionInfo(String host,
int port,
String userName,
String password)
Creates an instance of
EmailConnectionInfo class for Post Office Protocol. |
int |
getConnectionType()
Gets a connection type.
|
String |
getDomain()
Gets a domain.
|
String |
getHost()
Gets an URI of the mail server.
|
String |
getMailboxUri()
Gets an URI of the mailbox.
|
String |
getPassword()
Gets a password.
|
int |
getPort()
Gets a port of the mail server.
|
String |
getUserName()
Gets a username.
|
public int getConnectionType()
Gets a connection type.
public String getHost()
Gets an URI of the mail server.
public int getPort()
Gets a port of the mail server.
public String getMailboxUri()
Gets an URI of the mailbox.
public String getUserName()
Gets a username.
public String getPassword()
Gets a password.
public String getDomain()
Gets a domain.
public static EmailConnectionInfo createEwsConnectionInfo(String mailboxUri, String userName, String password, String domain)
Creates an instance of EmailConnectionInfo
class for Exchange Web Service.
mailboxUri
- The URI of the mailbox.userName
- The username.password
- The password.domain
- The domain name.EmailConnectionInfo
class.public static EmailConnectionInfo createEwsConnectionInfo(String mailboxUri, String userName, String password)
Creates an instance of EmailConnectionInfo
class for Exchange Web Service.
mailboxUri
- The URI of the mailbox.userName
- The username.password
- The password.EmailConnectionInfo
class.public static EmailConnectionInfo createPopConnectionInfo(String host, int port, String userName, String password)
Creates an instance of EmailConnectionInfo
class for Post Office Protocol.
host
- The URI of the server.port
- The port of the server.userName
- The username.password
- The password.EmailConnectionInfo
class.public static EmailConnectionInfo createImapConnectionInfo(String host, int port, String userName, String password)
Creates an instance of EmailConnectionInfo
class for Internet Message Access Protocol.
host
- The URI of the server.port
- The port of the server.userName
- The username.password
- The password.EmailConnectionInfo
class.