Class EmailOptions
Options for the email service.
Inherited Members
Namespace: IRM.Mail
Assembly: IRM.dll
Syntax
public class EmailOptions
Constructors
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
From
Gets or sets the email adress used as sender of e-mails.
Declaration
public EmailAddress From { get; set; }
Property Value
EmailAddress
|
Host
Password
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
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. |