ConfigFileParser Class |
Namespace: SMTPRouter.Windows.Configuration
The ConfigFileParser type exposes the following members.
| Name | Description | |
|---|---|---|
| ConfigFileParser |
Initializes a new instance of the ConfigFileParser | |
| ConfigFileParser(Configuration) |
Initializes a new instance of the ConfigFileParser |
| Name | Description | |
|---|---|---|
| Config |
The Configuration element
| |
| MessageLifespan |
The time a message is considered valid to retry. By default it is 15 minutes.
| |
| MessagePurgeLifespan |
The time a message is considered not purgeable. By default it is 90 days.
| |
| QueuePath |
A string to store the queue path
| |
| RoutingRules |
A ListT of RoutingRule containing all the rules used to route messages
| |
| SmtpConnections |
A DictionaryTKey, TValue containing the Smtp Connections keyed by the Smtp Configuration Key defined on the Key property
| |
| SmtpHost |
A SmtpConfiguration representing the Server SMTP Configuration
|
| Name | Description | |
|---|---|---|
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
<configSections> <section name="SmtpRouterConfiguration" type="SMTPRouter.Windows.Configuration.NameValueSection, SMTPRouter.Windows"/> <section name="SmtpConfiguration" type="SMTPRouter.Windows.Configuration.SmtpConnectionsSection, SMTPRouter.Windows"/> <section name="RoutingRulesConfiguration" type="SMTPRouter.Windows.Configuration.RoutingRulesSection, SMTPRouter.Windows"/> </configSections> <!-- Configuration for the Current SMTP Server --> <SmtpRouterConfiguration> <add name="Host" value="localhost"/> <add name="Port" value="25"/> <add name="MessageLifespanMinutes" value="15"/> <add name="MessagePurgeLifespanDays" value="90"/> </SmtpRouterConfiguration> <!-- Destination SMTPs --> <SmtpConfiguration> <SmtpConnections> <add key="gmail" description="Gmail SMTP Server" host="smtp.gmail.com" port="587" requiresAuthentication="true" user="user" password="pwd"/> <add key="hotmail" description="Hotmail SMTP Server" host="smtp.live.com" port="587" requiresAuthentication="true" user="user" password="pwd"/> </SmtpConnections> </SmtpConfiguration> <RoutingRulesConfiguration> <RoutingRules> <add executionSequence="10" type="SMTPRouter.Models.MailFromDomainRoutingRule, SMTPRouter" params="Domain=gmail.com" smtpkey="gmail" /> <add executionSequence="20" type="SMTPRouter.Models.MailFromDomainRoutingRule, SMTPRouter" params="Domain=hotmail.com;" smtpkey="hotmail" /> <add executionSequence="30" type="SMTPRouter.Models.MailFromRegexMatchRoutingRule, SMTPRouter" params="RegexExpression=\A[Uu](\d{5})\z" smtpkey="hotmail" /> </RoutingRules> </RoutingRulesConfiguration>