Yes. It works correctly.
-----Original Message-----
From: Ron Grabowski [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 15, 2006 2:16 PM
To: Log4NET User
Subject: Re: SmtpAppender and SSL
Have you verified that you're able to send mail through GMail by
creating a simple console app and System.Web.Mail?
--- Vladimir Kovalenko <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I am currently experiencing the following problem: I am using
> SmtpAppender.
> E-mails are sent via smtp.gmail.com which uses SSL. My configuration
> file
> looks like that:
>
>
>
> <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
> <authentication value="Basic" />
> <username value="username" />
> <password value="password" />
> <to value="[EMAIL PROTECTED]" />
> <from value="[EMAIL PROTECTED]" />
> <subject value="Logging information" />
> <smtpHost value="smtp.gmail.com" />
> <bufferSize value="512" />
> <lossy value="true" />
> <evaluator type="log4net.Core.LevelEvaluator">
> <threshold value="INFO"/>
> </evaluator>
> <layout type="log4net.Layout.PatternLayout">
> <conversionPattern value="%newline%date [%thread] %-5level
> %logger
> [%property{NDC}] - %message%newline%newline%newline" />
> </layout>
> </appender>
>
>
>
> I receive the following runtime error:
>
>
>
> log4net:ERROR [SmtpAppender] Error occurred while sending e-mail
> notification.
> System.Web.HttpException: The server rejected the sender address. The
> server
> response was: 530 5.7.0 Must issue a STARTTLS command first
> a29sm294756qbd
> ---> System.Reflection.TargetInvocationException: Exception has been
> thrown
> by the target of an invocation. --->
> System.Runtime.InteropServices.COMException (0x8004020E): The server
> rejected the sender address. The server response was: 530 5.7.0 Must
> issue a
> STARTTLS command first a29sm294756qbd
>
> --- End of inner exception stack trace ---
> at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
> invokeAttr,
> Object target, Object[] args, Boolean[] byrefModifiers, Int32
> culture,
> String[] namedParameters)
> at System.RuntimeType.InvokeMember(String name, BindingFlags
> bindingFlags,
> Binder binder, Object target, Object[] providedArgs,
> ParameterModifier[]
> modifiers, CultureInfo culture, String[] namedParams)
> at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object
> obj,
> String methodName, Object[] args)
> --- End of inner exception stack trace ---
> at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object
> obj,
> String methodName, Object[] args)
> at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMessage message)
> at System.Web.Mail.SmtpMail.Send(MailMessage message)
> at log4net.Appender.SmtpAppender.SendBuffer(LoggingEvent[] events)
>
>
>
> Have I missed something in my configuration? When I send e-mail with
> System.Net.Mail.SmtpClient.Send(.) with the setting provided above,
> everything goes ok.
>
>
>
>
>
> Best regards,
>
> Vladimir Kovalenko
>
>
>
>
>
>