logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Kovalenko" <gaset.kovale...@gmail.com>
Subject SmtpAppender and SSL
Date Wed, 15 Feb 2006 10:38:34 GMT
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="one@gmail.com" />
  <from value="two@gmail.com" />
  <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

 

 


Mime
View raw message