I've been trying to add cc and bcc addresses to log4net's SmtpAppender but I'm getting no flair:
<appender name="Mail" type="log4net.Appender.SmtpAppender"> <to value="[email protected]" /> <cc value="[email protected]" /> <bcc value="[email protected]" /> <from value="[email protected]" /> <subject value="Some pearls of wisdom for you" /> <smtpHost value="localhost" /> <bufferSize value="4096" /> <lossy value="false" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%newline%date [%-4level]%message" /> </layout> </appender>
I'm currently using log4net version 184.108.40.206, if anyone could help me out I'd be very glad.
According to this documentation, there is no cc and bcc fields in the SMTP appender.
You can use a semicolon-separated list for the To attribute (which would be almost equivalent to cc). But no solution for bcc.
You could create a class deriving from SmtpAppender, which adds these properties.
There is no bcc or cc, but you can use multiple 'to' addresses.
You actually need to use commas as separators most of the time. For .Net later than 1.1 you need commas, before you need semicolons.