The current implementation doesn't support CC or BCC delivery. You can add
support by using code similiar to this:
public class BccSmtpAppender : SmtpAppender
{
private string bcc;
protected override void SendEmail(string messageBody)
{
MailMessage mailMessage = new MailMessage();
mailMessage.Body = messageBody;
mailMessage.From = new MailAddress(From);
mailMessage.To.Add(To);
if (!String.IsNullOrEmpty(Bcc))
{
mailMessage.Bcc.Add(Bcc);
}
mailMessage.Subject = Subject;
mailMessage.Priority = Priority;
// send mail...
}
public string Bcc
{
get { return bcc; }
set { bcc = value; }
}
}
----- Original Message ----
From: Erlis Vidal <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, December 19, 2007 1:58:06 PM
Subject: BCC in SMTP Loger Appender!
<!--
_filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times
New Roman";}
a:link, span.MsoHyperlink
{color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
span.EmailStyle17
{font-family:Calibri;color:windowtext;font-weight:normal;font-style:normal;text-decoration:none
none;}
_filtered {margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{}
-->
Just a simple question!
It is possible to config the smtp logger appender to use a
bcc email address?
Thanks in advance
Erlis