You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Nicko Cadell <ni...@neoworks.com> on 2005/09/15 20:09:07 UTC
RE: SmtpAppender's problem
Add the following:
<userName value="***" />
<password value="***" />
to your <appender name="SmtpAppender"> element.
You will need to use the log4net build for net/1.1 as authentication is
not supported in net 1.0.
Nicko
> -----Original Message-----
> From: Johnny [mailto:danjingxiu@gmail.com]
> Sent: 14 September 2005 07:28
> To: Nicko Cadell
> Subject: SmtpAppender's problem
>
>
>
> Hi:
>
> Now I using log4net1.2.9.but I have a problem,when I want
> to configure it when the program is error then the log4net
> can send email to me,so, I configure it like this:
>
> <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
>
> <to value="danjx@ths.com.cn" />
>
> <from value="danjx@ths.com.cn" />
>
> <subject value="Error!!!" />
>
> <smtpHost value="mail.ths.com.cn" />
>
> <bufferSize value="3" />
>
> <evaluator type="log4net.Core.LevelEvaluator">
>
> <threshold value="ERROR" />
>
> </evaluator>
>
> <lossy value="true" />
>
> <layout type="log4net.Layout.PatternLayout">
>
> <conversionPattern value="%d %-5p - %m%n" />
>
> </layout>
>
> </appender>
>
>
>
> But it doesn't work ,becase the SmtpServer required
> authentication,so,We must configure Username and password and
> SmtpServer,I look at the source in SmtpAppender.cs, in 1.2.9
> the log4net add the authentication,but I don't know how to
> configure it in web.config,how to add username and password
> etc in my SmtpAppender,please help me ,thanks very much.
>
>
>
> Regards
>
>
>
>