public SendToEmailTraceListenerBuilder(ILoggingConfigurationSendTo context, string listenerName) : base(context) { emailTraceListener = new EmailTraceListenerData { Name = listenerName }; base.AddTraceListenerToSettingsAndCategory(emailTraceListener); }
/// <summary> /// Initializes a <see cref="EmailMessage"/> with the raw data to create and email, the MsgEntry, and the formatter /// </summary> /// <param name="toAddress">A semicolon delimited string the represents to whom the email should be sent.</param> /// <param name="fromAddress">Represents from whom the email is sent.</param> /// <param name="subjectLineStarter">Starting text for the subject line.</param> /// <param name="subjectLineEnder">Ending text for the subject line.</param> /// <param name="smtpServer">The name of the SMTP server.</param> /// <param name="smtpPort">The port on the SMTP server to use for sending the email.</param> /// <param name="MsgEntry">The MsgEntry <see cref="MsgEntry"/> to send via email.</param> /// <param name="formatter">The Formatter <see cref="IMsgFormatter"/> which determines how the /// email message should be formatted</param> /// <param name="authenticationMode">Authenticate mode to use when connecting to SMTP server.</param> /// <param name="userName">User name to send to SMTP server if using username/password authentication.</param> /// <param name="password">Password to send to SMTP server if using username/password authentication.</param> /// <param name="useSSL">Use SSL to connect to STMP server - if true, yes, if false, no.</param> public EmailMessage(string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, MsgEntry MsgEntry, IMsgFormatter formatter, EmailAuthenticationMode authenticationMode, string userName, string password, bool useSSL) { this.configurationData = new EmailTraceListenerData(toAddress, fromAddress, subjectLineStarter, subjectLineEnder, smtpServer, smtpPort, string.Empty) { AuthenticationMode = authenticationMode, UserName = userName, Password = password, UseSSL = useSSL }; this.MsgEntry = MsgEntry; this.formatter = formatter; }
/// <summary> /// Initializes a <see cref="EmailMessage"/> with the raw data to create and email, the MsgEntry, and the formatter /// </summary> /// <param name="toAddress">A semicolon delimited string the represents to whom the email should be sent.</param> /// <param name="fromAddress">Represents from whom the email is sent.</param> /// <param name="subjectLineStarter">Starting text for the subject line.</param> /// <param name="subjectLineEnder">Ending text for the subject line.</param> /// <param name="smtpServer">The name of the SMTP server.</param> /// <param name="smtpPort">The port on the SMTP server to use for sending the email.</param> /// <param name="MsgEntry">The MsgEntry <see cref="MsgEntry"/> to send via email.</param> /// <param name="formatter">The Formatter <see cref="IMsgFormatter"/> which determines how the /// email message should be formatted</param> public EmailMessage(string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, MsgEntry MsgEntry, IMsgFormatter formatter) { this.configurationData = new EmailTraceListenerData(toAddress, fromAddress, subjectLineStarter, subjectLineEnder, smtpServer, smtpPort, string.Empty); this.MsgEntry = MsgEntry; this.formatter = formatter; }
/// <summary> /// Initializes a <see cref="EmailMessage"/> with email configuration data, MsgEntry, and formatter /// </summary> /// <param name="configurationData">The configuration data <see cref="EmailTraceListenerData"/> /// that represents how to create the email message</param> /// <param name="MsgEntry">The MsgEntry <see cref="MsgEntry"/> to send via email.</param> /// <param name="formatter">The Formatter <see cref="IMsgFormatter"/> which determines how the /// email message should be formatted</param> public EmailMessage(EmailTraceListenerData configurationData, MsgEntry MsgEntry, IMsgFormatter formatter) { this.configurationData = configurationData; this.MsgEntry = MsgEntry; this.formatter = formatter; }