Click or drag to resize

SmtpClientConfig Class

Class which is used by MailMergeSender in order to build preconfigured SmtpClients.
Inheritance Hierarchy

Namespace:  MailMergeLib
Assembly:  MailMergeLib (in MailMergeLib.dll) Version:
public class SmtpClientConfig

The SmtpClientConfig type exposes the following members.

Public methodSmtpClientConfig
Creates a new instance of the configuration which is used by MailMergeSender in order to build a preconfigured SmtpClient.
Public propertyCode exampleClientCertificates
Gets the collection of certificates the SmtpClient will use.
Public propertyClientDomain
Gets or sets the name of the local machine sent to the SMTP server with the hello command of an SMTP transaction. Defaults to the windows machine name.
Public propertyDelayBetweenMessages
Gets or sets the delay time in milliseconds (0-10000) between the messages. In case more than one SmtpClient will be used concurrently, the delay will be used per thread. Mainly used for debug purposes.
Public propertyLocalEndPoint
Gets or sets the local IP end point or null to use the default end point.
Public propertyMailOutputDirectory
Gets or sets the name of the output directory of sent mail messages (only used if messages are not sent to SMTP server)
Public propertyMaxFailures
Gets or sets the number of failures (1-10) for which a retry to send will be performed.
Public propertyMessageOutput
Gets or sets the location where to send mail messages.
Public propertyName
Get or sets the name of configuration. It's recommended to choose different names for each configuration.
Public propertyNetworkCredential
Set authentification details for logging into an SMTP server. Set NetworkCredential to null if no authentification is required.
Public propertyRetryDelayTime
Gets or sets the delay time in milliseconds (0-10000) to elaps between retries to send the message.
Public propertySecureSocketOptions
Gets or sets the SecureSocketOptions the SmtpClient will use (e.g. SSL or STARTLS In case a secure socket is needed, setting options to SecureSocketOptions.Auto is recommended.
Public propertyServerCertificateValidationCallback
Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication.
Public propertySmtpHost
Gets or sets the name or IP address of the SMTP host to be used for sending mails.
Public propertySmtpPort
Gets or set the port of the SMTP host to be used for sending mails.
Public propertySslProtocols
Gets or sets the SSL/TLS protocols the SmtpClient is allowed to use.
Public propertyTimeout
Gets or sets the timeout for sending a message, after which a time-out exception will raise. Timeout value in milliseconds. The default value is 100,000 (100 seconds).
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object).)
Protected methodEquals(SmtpClientConfig)
Determines whether the specified object is equal to the current object.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Returns the hastcode for this object.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReadSmtpConfigurationFromWebConfig
If MailMergeLib runs on an IIS web application, it can load the following settings from configuration section of web.donfig: DeliveryMethod, MessageOutput, EnableSsl, Network.UserName, Network.Password, Network.Host, Network.Port, Network.ClientDomain
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public fieldCode exampleProtocolLoggerDelegate
The delegate for an IProtocolLogger that SmtpClient will use to log the dialogue with the SMTP server. This logger is dedicated to debugging, not for production use.
See Also