MailServer implements a data model for mail servers configuration.
Default constructor
public Void MailServer()
Initializes a new instance of MailServer.
public Void MailServer(id)
Name | Type | Summary |
---|---|---|
id | String | Object Id. |
Gets whether the model validation must be enforced.
public Boolean EnforceModelValidation { get; }
Address from which mails are sent.
public String From { get; set; }
Display name for the sending address.
public String FromName { get; set; }
The identification of this MailServer.
public String Id { get; set; }
Server name or IP address.
public String Name { get; set; }
Mail sending port.
public Int32 Port { get; set; }
Whether the server requires SSL.
public Boolean RequiresSsl { get; set; }
Whether the server uses authentication.
public Boolean UseAuthentication { get; set; }
User name for use with authentication.
public String UserName { get; set; }
Password of the user for use with authentication.
public String UserPassword { get; set; }
Checks whether other is equal to this object.
public Boolean Equals(other)
Name | Type | Summary |
---|---|---|
other | MailServer | The object to check equality to. |
Checks whether obj is equal to this object.
public Boolean Equals(obj)
Name | Type | Summary |
---|---|---|
obj | Object | The object to compare this object to. |
Serves as the default hash function.
public Int32 GetHashCode()
Initializes a new instance of MailServer and loads it data from the underlaying repository.
public MailServer Load(id)
Name | Type | Summary |
---|---|---|
id | String | Object Id. |
Initializes a new instance of MailServer and loads it data from the underlaying repository asyncronously.
public Task<MailServer> LoadAsync(id)
Name | Type | Summary |
---|---|---|
id | String | Object Id. |
Sends a message by mail.
public Task SendAsync(message)
Name | Type | Summary |
---|---|---|
message | Message | The message to send. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when message is null. |
SendException | Thrown when an error occours while sendind the message. |
Returns a textual representation of a MailServer.
public String ToString()
Checks whether the object is valid for saving.
public Void Validate()
Type | Summary |
---|---|
ValidationException | Thrown when the object is not valid. |