/// <summary> /// Initializes a <see cref="HtmlEmailMessage"/> with the raw data to create and email, a message, 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="message">Represents the message to send via email.</param> /// <param name="formatter">The Formatter <see cref="ILogFormatter"/> which determines how the /// email message should be formatted</param> public HtmlEmailMessage(string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, string message, ILogFormatter formatter) { this.configurationData = new HtmlEmailTraceListenerData(toAddress, fromAddress, subjectLineStarter, subjectLineEnder, smtpServer, smtpPort, string.Empty); this.logEntry = new LogEntry(); logEntry.Message = message; this.formatter = formatter; }
/// <summary> /// Initializes a <see cref="HtmlEmailMessage"/> with the raw data to create and email, the logentry, 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="logEntry">The LogEntry <see cref="LogEntry"/> to send via email.</param> /// <param name="formatter">The Formatter <see cref="ILogFormatter"/> 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 HtmlEmailMessage(string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, LogEntry logEntry, ILogFormatter formatter, EmailAuthenticationMode authenticationMode, string userName, string password, bool useSSL) { this.configurationData = new HtmlEmailTraceListenerData(toAddress, fromAddress, subjectLineStarter, subjectLineEnder, smtpServer, smtpPort, string.Empty) { AuthenticationMode = authenticationMode, UserName = userName, Password = password, UseSSL = useSSL }; this.logEntry = logEntry; this.formatter = formatter; }
/// <summary> /// Initializes a <see cref="HtmlEmailMessage"/> with email configuration data, logentry, and formatter /// </summary> /// <param name="configurationData">The configuration data <see cref="HtmlEmailTraceListenerData"/> /// that represents how to create the email message</param> /// <param name="logEntry">The LogEntry <see cref="LogEntry"/> to send via email.</param> /// <param name="formatter">The Formatter <see cref="ILogFormatter"/> which determines how the /// email message should be formatted</param> public HtmlEmailMessage(HtmlEmailTraceListenerData configurationData, LogEntry logEntry, ILogFormatter formatter) { this.configurationData = configurationData; this.logEntry = logEntry; this.formatter = formatter; }