Class EmailTraceListenerData
- Assembly
- Microsoft.Practices.EnterpriseLibrary.Logging.dll
Represents the configuration settings that describe a EmailTraceListener.
public class EmailTraceListenerData : TraceListenerData
- Inheritance
-
EmailTraceListenerData
- Inherited Members
Constructors
EmailTraceListenerData()
Initializes a EmailTraceListenerData.
public EmailTraceListenerData()
EmailTraceListenerData(string, string, string, string, string, int, string)
Initializes a EmailTraceListenerData with a toaddress, fromaddress, subjectLineStarter, subjectLineEnder, smtpServer, and a formatter name.
public EmailTraceListenerData(string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, string formatterName)
Parameters
toAddress
stringA semicolon delimited string the represents to whom the email should be sent.
fromAddress
stringRepresents from whom the email is sent.
subjectLineStarter
stringStarting text for the subject line.
subjectLineEnder
stringEnding text for the subject line.
smtpServer
stringThe name of the SMTP server.
smtpPort
intThe port on the SMTP server to use for sending the email.
formatterName
stringThe name of the Formatter ILogFormatter which determines how the email message should be formatted
EmailTraceListenerData(string, string, string, string, string, string)
Initializes a EmailTraceListenerData with a toaddress, fromaddress, subjectLineStarter, subjectLineEnder, smtpServer, and a formatter name. Default value for the SMTP port is 25
public EmailTraceListenerData(string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, string formatterName)
Parameters
toAddress
stringA semicolon delimited string the represents to whom the email should be sent.
fromAddress
stringRepresents from whom the email is sent.
subjectLineStarter
stringStarting text for the subject line.
subjectLineEnder
stringEnding text for the subject line.
smtpServer
stringThe name of the SMTP server.
formatterName
stringThe name of the Formatter ILogFormatter which determines how the email message should be formatted
EmailTraceListenerData(string, string, string, string, string, string, int, string)
Initializes a EmailTraceListenerData with a toaddress, fromaddress, subjectLineStarter, subjectLineEnder, smtpServer, and a formatter name.
public EmailTraceListenerData(string name, string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, string formatterName)
Parameters
name
stringThe name of this listener
toAddress
stringA semicolon delimited string the represents to whom the email should be sent.
fromAddress
stringRepresents from whom the email is sent.
subjectLineStarter
stringStarting text for the subject line.
subjectLineEnder
stringEnding text for the subject line.
smtpServer
stringThe name of the SMTP server.
smtpPort
intThe port on the SMTP server to use for sending the email.
formatterName
stringThe name of the Formatter ILogFormatter which determines how the email message should be formatted
EmailTraceListenerData(string, string, string, string, string, string, int, string, TraceOptions)
Initializes a EmailTraceListenerData with a toaddress, fromaddress, subjectLineStarter, subjectLineEnder, smtpServer, a formatter name and trace options.
public EmailTraceListenerData(string name, string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, string formatterName, TraceOptions traceOutputOptions)
Parameters
name
stringThe name of this listener
toAddress
stringA semicolon delimited string the represents to whom the email should be sent.
fromAddress
stringRepresents from whom the email is sent.
subjectLineStarter
stringStarting text for the subject line.
subjectLineEnder
stringEnding text for the subject line.
smtpServer
stringThe name of the SMTP server.
smtpPort
intThe port on the SMTP server to use for sending the email.
formatterName
stringThe name of the Formatter ILogFormatter which determines how the email message should be formatted
traceOutputOptions
TraceOptionsThe trace options.
EmailTraceListenerData(string, string, string, string, string, string, int, string, TraceOptions, SourceLevels)
Initializes a EmailTraceListenerData with a toaddress, fromaddress, subjectLineStarter, subjectLineEnder, smtpServer, a formatter name and trace options.
public EmailTraceListenerData(string name, string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, string formatterName, TraceOptions traceOutputOptions, SourceLevels filter)
Parameters
name
stringThe name of this listener
toAddress
stringA semicolon delimited string the represents to whom the email should be sent.
fromAddress
stringRepresents from whom the email is sent.
subjectLineStarter
stringStarting text for the subject line.
subjectLineEnder
stringEnding text for the subject line.
smtpServer
stringThe name of the SMTP server.
smtpPort
intThe port on the SMTP server to use for sending the email.
formatterName
stringThe name of the Formatter ILogFormatter which determines how the email message should be formatted
traceOutputOptions
TraceOptionsThe trace options.
filter
SourceLevelsThe filter to apply.
EmailTraceListenerData(string, string, string, string, string, string, int, string, TraceOptions, SourceLevels, EmailAuthenticationMode, string, string, bool)
Initializes a EmailTraceListenerData with a toaddress, fromaddress, subjectLineStarter, subjectLineEnder, smtpServer, a formatter name, trace options and authentication information.
public EmailTraceListenerData(string name, string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, string formatterName, TraceOptions traceOutputOptions, SourceLevels filter, EmailAuthenticationMode authenticationMode, string userName, string password, bool useSSL)
Parameters
name
stringThe name of this listener
toAddress
stringA semicolon delimited string the represents to whom the email should be sent.
fromAddress
stringRepresents from whom the email is sent.
subjectLineStarter
stringStarting text for the subject line.
subjectLineEnder
stringEnding text for the subject line.
smtpServer
stringThe name of the SMTP server.
smtpPort
intThe port on the SMTP server to use for sending the email.
formatterName
stringThe name of the Formatter ILogFormatter which determines how the email message should be formatted
traceOutputOptions
TraceOptionsThe trace options.
filter
SourceLevelsThe filter to apply.
authenticationMode
EmailAuthenticationModeAuthenticate mode to use.
userName
stringUser name to pass to the server if using UserNameAndPassword.
password
stringPassword to pass to the server if using UserNameAndPassword.
useSSL
boolConnect to the server using SSL?
Properties
AuthenticationMode
How do you authenticate against the email server?
public EmailAuthenticationMode AuthenticationMode { get; set; }
Property Value
Formatter
Gets and sets the formatter name.
public string Formatter { get; set; }
Property Value
FromAddress
Gets and sets the FromAddress. Email address that messages will be sent from.
public string FromAddress { get; set; }
Property Value
Password
Password when authenticating with user name and password.
public string Password { get; set; }
Property Value
SmtpPort
Gets and sets the SMTP port.
public int SmtpPort { get; set; }
Property Value
SmtpServer
Gets and sets the SMTP server to use to send messages.
public string SmtpServer { get; set; }
Property Value
SubjectLineEnder
Gets and sets the Subject suffix.
public string SubjectLineEnder { get; set; }
Property Value
SubjectLineStarter
Gets and sets the Subject prefix.
public string SubjectLineStarter { get; set; }
Property Value
ToAddress
Gets and sets the ToAddress. One or more email semicolon separated addresses.
public string ToAddress { get; set; }
Property Value
UseSSL
Use SSL to connect to the email server?
public bool UseSSL { get; set; }
Property Value
UserName
User name when authenticating with user name and password.
public string UserName { get; set; }
Property Value
Methods
CoreBuildTraceListener(LoggingSettings)
Builds the TraceListener object represented by this configuration object.
protected override TraceListener CoreBuildTraceListener(LoggingSettings settings)
Parameters
settings
LoggingSettingsThe logging configuration settings.