Package com.mailosaur
Class Servers
java.lang.Object
com.mailosaur.Servers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(ServerCreateOptions options) Creates a new virtual server.voidPermanently delete a server.generateEmailAddress(String serverId) Generates a random email address by appending a random string in front of the server's domain name.Retrieves the detail for a single server.getPassword(String serverId) Retrieves the password for a server.list()Returns a list of your virtual servers.Updates the attributes of a server.
-
Constructor Details
-
Servers
-
-
Method Details
-
list
Returns a list of your virtual servers. Servers are returned sorted in alphabetical order.- Returns:
- The result of the server listing operation.
- Throws:
MailosaurException- Thrown if Mailosaur responds with an error.IOException- Unexpected exception.
-
create
Creates a new virtual server.- Parameters:
options- Options used to create a new Mailosaur server.- Returns:
- Mailosaur virtual SMTP/SMS server.
- Throws:
MailosaurException- Thrown if Mailosaur responds with an error.IOException- Unexpected exception.
-
get
Retrieves the detail for a single server.- Parameters:
serverId- The unique identifier of the server.- Returns:
- Mailosaur virtual SMTP/SMS server.
- Throws:
MailosaurException- Thrown if Mailosaur responds with an error.IOException- Unexpected exception.
-
getPassword
Retrieves the password for a server. This password can be used for SMTP, POP3, and IMAP connectivity.- Parameters:
serverId- The unique identifier of the server.- Returns:
- The password for the server.
- Throws:
MailosaurException- Thrown if Mailosaur responds with an error.IOException- Unexpected exception.
-
update
Updates the attributes of a server.- Parameters:
serverId- The unique identifier of the server.server- The updated server.- Returns:
- Mailosaur virtual SMTP/SMS server.
- Throws:
MailosaurException- Thrown if Mailosaur responds with an error.IOException- Unexpected exception.
-
delete
Permanently delete a server. This will also delete all messages, associated attachments, etc. within the server. This operation cannot be undone.- Parameters:
serverId- The unique identifier of the server.- Throws:
MailosaurException- Thrown if Mailosaur responds with an error.
-
generateEmailAddress
Generates a random email address by appending a random string in front of the server's domain name.- Parameters:
serverId- The identifier of the server.- Returns:
- A random email address.
-