Table of Contents

Class EmailTraceListenerData

Namespace
Microsoft.Practices.EnterpriseLibrary.Logging.Configuration
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 string

A semicolon delimited string the represents to whom the email should be sent.

fromAddress string

Represents from whom the email is sent.

subjectLineStarter string

Starting text for the subject line.

subjectLineEnder string

Ending text for the subject line.

smtpServer string

The name of the SMTP server.

smtpPort int

The port on the SMTP server to use for sending the email.

formatterName string

The 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 string

A semicolon delimited string the represents to whom the email should be sent.

fromAddress string

Represents from whom the email is sent.

subjectLineStarter string

Starting text for the subject line.

subjectLineEnder string

Ending text for the subject line.

smtpServer string

The name of the SMTP server.

formatterName string

The 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 string

The name of this listener

toAddress string

A semicolon delimited string the represents to whom the email should be sent.

fromAddress string

Represents from whom the email is sent.

subjectLineStarter string

Starting text for the subject line.

subjectLineEnder string

Ending text for the subject line.

smtpServer string

The name of the SMTP server.

smtpPort int

The port on the SMTP server to use for sending the email.

formatterName string

The 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 string

The name of this listener

toAddress string

A semicolon delimited string the represents to whom the email should be sent.

fromAddress string

Represents from whom the email is sent.

subjectLineStarter string

Starting text for the subject line.

subjectLineEnder string

Ending text for the subject line.

smtpServer string

The name of the SMTP server.

smtpPort int

The port on the SMTP server to use for sending the email.

formatterName string

The name of the Formatter ILogFormatter which determines how the email message should be formatted

traceOutputOptions TraceOptions

The 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 string

The name of this listener

toAddress string

A semicolon delimited string the represents to whom the email should be sent.

fromAddress string

Represents from whom the email is sent.

subjectLineStarter string

Starting text for the subject line.

subjectLineEnder string

Ending text for the subject line.

smtpServer string

The name of the SMTP server.

smtpPort int

The port on the SMTP server to use for sending the email.

formatterName string

The name of the Formatter ILogFormatter which determines how the email message should be formatted

traceOutputOptions TraceOptions

The trace options.

filter SourceLevels

The 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 string

The name of this listener

toAddress string

A semicolon delimited string the represents to whom the email should be sent.

fromAddress string

Represents from whom the email is sent.

subjectLineStarter string

Starting text for the subject line.

subjectLineEnder string

Ending text for the subject line.

smtpServer string

The name of the SMTP server.

smtpPort int

The port on the SMTP server to use for sending the email.

formatterName string

The name of the Formatter ILogFormatter which determines how the email message should be formatted

traceOutputOptions TraceOptions

The trace options.

filter SourceLevels

The filter to apply.

authenticationMode EmailAuthenticationMode

Authenticate mode to use.

userName string

User name to pass to the server if using UserNameAndPassword.

password string

Password to pass to the server if using UserNameAndPassword.

useSSL bool

Connect to the server using SSL?

Properties

AuthenticationMode

How do you authenticate against the email server?

public EmailAuthenticationMode AuthenticationMode { get; set; }

Property Value

EmailAuthenticationMode

Formatter

Gets and sets the formatter name.

public string Formatter { get; set; }

Property Value

string

FromAddress

Gets and sets the FromAddress. Email address that messages will be sent from.

public string FromAddress { get; set; }

Property Value

string

Password

Password when authenticating with user name and password.

public string Password { get; set; }

Property Value

string

SmtpPort

Gets and sets the SMTP port.

public int SmtpPort { get; set; }

Property Value

int

SmtpServer

Gets and sets the SMTP server to use to send messages.

public string SmtpServer { get; set; }

Property Value

string

SubjectLineEnder

Gets and sets the Subject suffix.

public string SubjectLineEnder { get; set; }

Property Value

string

SubjectLineStarter

Gets and sets the Subject prefix.

public string SubjectLineStarter { get; set; }

Property Value

string

ToAddress

Gets and sets the ToAddress. One or more email semicolon separated addresses.

public string ToAddress { get; set; }

Property Value

string

UseSSL

Use SSL to connect to the email server?

public bool UseSSL { get; set; }

Property Value

bool

UserName

User name when authenticating with user name and password.

public string UserName { get; set; }

Property Value

string

Methods

CoreBuildTraceListener(LoggingSettings)

Builds the TraceListener object represented by this configuration object.

protected override TraceListener CoreBuildTraceListener(LoggingSettings settings)

Parameters

settings LoggingSettings

The logging configuration settings.

Returns

TraceListener

An EmailTraceListener.