Show / Hide Table of Contents

Class EmailOptions

Options for the email service.

Inheritance
Object
EmailOptions
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Namespace: IRM.Mail
Assembly: IRM.dll
Syntax
public class EmailOptions

Constructors

EmailOptions()

Creates a new instance of EmailOptions.

Declaration
public EmailOptions()

EmailOptions(String, String)

Creates a new instance of EmailOptions.

Declaration
public EmailOptions(string host, string from)
Parameters
String host

The host to send e-mails through.

String from

The email adress used as sender of e-mails.

Properties

AllowedReceiverDomains

Gets or sets a semi-colon seperated string with domain names that the sender will allow e-mail to be send to. It none is set, all e-mail will be send, but when set, only e-mails to these domains will be send and all other will be logged.

Declaration
public string AllowedReceiverDomains { get; set; }
Property Value
String

EnableSsl

Specify whether the System.Net.Mail.SmtpClient uses Secure Sockets Layer (SSL) to encrypt the connection.

Declaration
public bool EnableSsl { get; set; }
Property Value
Boolean

true if the System.Net.Mail.SmtpClient uses SSL; otherwise, false. The default is false.

See Also
System.Net.Mail.SmtpClient.EnableSsl

From

Gets or sets the email adress used as sender of e-mails.

Declaration
public EmailAddress From { get; set; }
Property Value
EmailAddress

Host

Gets or sets the host.

Declaration
public string Host { get; set; }
Property Value
String

Password

Gets or sets the password.

Declaration
public string Password { get; set; }
Property Value
String

PickupDirectoryLocation

Gets or sets the folder where application save mail messages. Notice that no mail messages will be send when this options is set to a value.

Declaration
public string PickupDirectoryLocation { get; set; }
Property Value
String

Port

Gets or sets the port.

Declaration
public int Port { get; set; }
Property Value
System.Int32

ReplaceAllReceiversTo

Replaces all receivers of an e-mail to only this specified receiver.

Declaration
public string ReplaceAllReceiversTo { get; set; }
Property Value
String

Remarks

This is used for testing purposes, where all e-mails should be sent to this specified receiver.

Username

Gets or sets the username.

Declaration
public string Username { get; set; }
Property Value
String

Methods

GetReceivers(IEnumerable<EmailAddress>)

Filters the list of receivers to only contain the allowed address according to these options.

Declaration
public IEnumerable<EmailAddress> GetReceivers(IEnumerable<EmailAddress> receivers)
Parameters
IEnumerable<EmailAddress> receivers

The list of recievers that the application want to send too.

Returns
IEnumerable<EmailAddress>

A filtered list of recievers according to these options.

Extension Methods

ObjectExtensions.DeepClone<T>(T)
SimpleEmailServiceExtensions.ConvertAccessKeyToSmtpPassword(EmailOptions)
AnnotationsExtensions.IsValid(Object)
Back to top Generated by DocFX