logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sree" <sree.opt...@gmail.com>
Subject RE: Error while sending Mail to smtp.gmail.com
Date Mon, 20 Jul 2009 07:50:26 GMT
No this also didn't work out.

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Friday, July 17, 2009 4:53 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

strange, this property exists in source code taken from source repository.
But doesn't exist in binary distribution (even there is no ssl property!),
so try to get current sources from repository, compile and try again....

Radovan

 

  _____  

Od: Sree [mailto:sree.optust@gmail.com] 
Odesláno: 17. července 2009 13:09
Komu: 'Log4NET User'
Předmět: RE: Error while sending Mail to smtp.gmail.com

log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [enablessl] to
set object on [log4net.Appender.SmtpAppender]

 

getting the above error

 

Best regards,

Sree

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Friday, July 17, 2009 4:29 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

do not delete ssl property, but rename it to enablessl.

Radovan

 

  _____  

Od: Sree [mailto:sree.optust@gmail.com] 
Odesláno: 17. července 2009 10:24
Komu: 'Log4NET User'
Předmět: RE: Error while sending Mail to smtp.gmail.com

 

Fyi: I added the property taking reference from
http://logback.qos.ch/manual/appenders.html 

 

If I remove the ssl property I get the following error:

 

log4net:ERROR [SmtpAppender] Error occurred while sending e-mail
notification.

System.Net.Mail.SmtpException: The SMTP server requires a secure connection
or the client was not authenticated. The server response was: 5.7.0 Must
issue a STARTTLS command first. b39sm3288571rvf.8

   at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode,
String response)

   at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command,
String from)

   at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify,
SmtpFailedRecipientException& exception)

   at System.Net.Mail.SmtpClient.Send(MailMessage message)

   at log4net.Appender.SmtpAppender.SendEmail(String messageBody)

   at log4net.Appender.SmtpAppender.SendBuffer(LoggingEvent[] events)

 

Best regards,

Sree

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Friday, July 17, 2009 1:44 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

According to documentation, there is no Ssl property for SmtpAppender.
According source code it is named EnableSsl, so repair your config.

But I'm not sure if it helps...

Radovan Raszka

 

 

  _____  

From: Sree [mailto:sree.optust@gmail.com] 
Sent: Friday, July 17, 2009 12:30 PM
To: 'log4net-user@logging.apache.org'
Subject: Error while sending Mail to smtp.gmail.com

 

--> I'm able to successfully send mail using .net code through gmail by
enabling SSL.

 

But using log4net its given error:

 

My Code in app.config file: 

 

     <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">

      <to value="myusername@gmail.com" />

      <from value=" myusername@gmail.com " />

      <subject value="test logging message" />

      <smtpHost value="smtp.gmail.com" />

      <authentication value = "Basic" />

      <username value = " myusername@gmail.com " />

      <password value = "mypassword" />

      <ssl value ="true"/>

      <port value ="465"/>

      <bufferSize value="512" />

      <lossy value="true" />

      <evaluator type="log4net.Core.LevelEvaluator">

        <threshold value="ALL"/>

      </evaluator>

      <layout type="log4net.Layout.PatternLayout">

        <conversionPattern value="%newline%date [%thread] %-5level %logger
[%property{NDC}] - %message%newline%newline%newline" />

      </layout>

    </appender>

 

 

 

Getting error:

 

log4net:ERROR [SmtpAppender] Error occurred while sending e-mail
notification.

System.Net.Mail.SmtpException: The operation has timed out.

   at System.Net.Mail.SmtpClient.Send(MailMessage message)

   at log4net.Appender.SmtpAppender.SendEmail(String messageBody)

   at log4net.Appender.SmtpAppender.SendBuffer(LoggingEvent[] events)

 

 

 

I tried using STARTTLS protocol also.which gave me an error with
authentication and so..

 

 

 

Please help me out..I deadly need it work it down.

 

Best regards,

Sree


Mime
View raw message