MailServer

MailServer implements a data model for mail servers configuration.

Namespace:
Inetdev.Multitenancy.DataModels
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No
Inherits from:
Inetdev.Data.DataModel
Implements:
System.IEquatable{Inetdev.Multitenancy.DataModels.MailServer}, Inetdev.Messaging.IMessageService

Constructors

MailServer

Default constructor

Signature:
public Void MailServer()

MailServer

Initializes a new instance of MailServer.

Signature:
public Void MailServer(id)
Parameters
Name Type Summary
id String Object Id.

Properties

EnforceModelValidation

Gets whether the model validation must be enforced.

Signature:
public Boolean EnforceModelValidation { get; }

From

Address from which mails are sent.

Signature:
public String From { get; set; }

FromName

Display name for the sending address.

Signature:
public String FromName { get; set; }

Id

The identification of this MailServer.

Signature:
public String Id { get; set; }

Name

Server name or IP address.

Signature:
public String Name { get; set; }

Port

Mail sending port.

Signature:
public Int32 Port { get; set; }

RequiresSsl

Whether the server requires SSL.

Signature:
public Boolean RequiresSsl { get; set; }

UseAuthentication

Whether the server uses authentication.

Signature:
public Boolean UseAuthentication { get; set; }

UserName

User name for use with authentication.

Signature:
public String UserName { get; set; }

UserPassword

Password of the user for use with authentication.

Signature:
public String UserPassword { get; set; }

Methods

Equals

Checks whether other is equal to this object.

Signature:
public Boolean Equals(other)
Parameters
Name Type Summary
other MailServer The object to check equality to.

Equals

Checks whether obj is equal to this object.

Signature:
public Boolean Equals(obj)
Parameters
Name Type Summary
obj Object The object to compare this object to.

GetHashCode

Serves as the default hash function. Not required, implemented to avoid compiler warning.

Signature:
public Int32 GetHashCode()

Load

Initializes a new instance of MailServer and loads it data from the underlaying repository.

Signature:
public MailServer Load(id)
Parameters
Name Type Summary
id String Object Id.

LoadAsync

Initializes a new instance of MailServer and loads it data from the underlaying repository asyncronously.

Signature:
public Task<MailServer> LoadAsync(id)
Parameters
Name Type Summary
id String Object Id.

SendAsync

Sends a message by mail.

Signature:
public Task SendAsync(message)
Parameters
Name Type Summary
message Message The message to send.
Exceptions
Type Summary
ArgumentNullException Thrown when message is null.
SendException Thrown when an error occours while sendind the message.

ToString

Returns a textual representation of a MailServer.

Signature:
public String ToString()

Validate

Checks whether the object is valid for saving.

Signature:
public Void Validate()
Exceptions
Type Summary
ValidationException Thrown when the object is not valid.