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 Sree <sr...@gmail.com> on 2009/07/17 09:08:53 UTC

RE: Error while sending Mail to smtp.gmail.com

 

 

  _____  

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


RE: Error while sending Mail to smtp.gmail.com

Posted by Sree <sr...@gmail.com>.
The issue was with the log4net.dll.. I downloaded from their site.

 

After I used the dll from ur project in my project it worked out.

 

>From where I could get this valid dll..please let me know.

 

Best regards,

Sree

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Wednesday, July 22, 2009 3:36 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

use username & password you are using when accesing you mail through web
interface. Username should be your alias from email addres. If address is
your.name@gmail.com, username should be your.name. But I don't know, if it
is always true.

RR

 

  _____  

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

I found a change:

 

Wrt UserName & Password - what is the value we need to specify?

 

Till now I was using my gmail username & password..

 

Might be that is the mistake I'm doing.

 

Please let me know..

 

Best regards,

Sree

 

  _____  

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

 

Try my testing project on your machine (I think lossy and buffer settings
has significant effect whether message is really sent or not, but always I
get no exception). If it works, search for differences in your project
(notice I am using log4net build from repository, it probably will not work
with release available on download page).

If not - your computer probably made god angry.

RR

 

  _____  

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

 

I've disabled the windows firewall & also the antivirus software but sill
got the below error.no change. :-(

 

 

Best regards,

Sree

 

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 3:22 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

One more idea - is there any antivirus / firewall software on the computer
you are doing your tests? It can block communication - I had to switch
outgoing mail checking off somewhere in the past....

RR

 


RE: Error while sending Mail to smtp.gmail.com

Posted by Sree <sr...@gmail.com>.
Ya its working. I tried out with my credentials in ur code.

 

Thanks a lot.It was really a great help.

 

Best regards,

Sree

 

 

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Wednesday, July 22, 2009 3:36 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

use username & password you are using when accesing you mail through web
interface. Username should be your alias from email addres. If address is
your.name@gmail.com, username should be your.name. But I don't know, if it
is always true.

RR

 

  _____  

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

I found a change:

 

Wrt UserName & Password - what is the value we need to specify?

 

Till now I was using my gmail username & password..

 

Might be that is the mistake I'm doing.

 

Please let me know..

 

Best regards,

Sree

 

  _____  

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

 

Try my testing project on your machine (I think lossy and buffer settings
has significant effect whether message is really sent or not, but always I
get no exception). If it works, search for differences in your project
(notice I am using log4net build from repository, it probably will not work
with release available on download page).

If not - your computer probably made god angry.

RR

 

  _____  

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

 

I've disabled the windows firewall & also the antivirus software but sill
got the below error.no change. :-(

 

 

Best regards,

Sree

 

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 3:22 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

One more idea - is there any antivirus / firewall software on the computer
you are doing your tests? It can block communication - I had to switch
outgoing mail checking off somewhere in the past....

RR

 


RE: Error while sending Mail to smtp.gmail.com

Posted by Sree <sr...@gmail.com>.
:-( it didn't work out.

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Wednesday, July 22, 2009 3:36 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

use username & password you are using when accesing you mail through web
interface. Username should be your alias from email addres. If address is
your.name@gmail.com, username should be your.name. But I don't know, if it
is always true.

RR

 

  _____  

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

I found a change:

 

Wrt UserName & Password - what is the value we need to specify?

 

Till now I was using my gmail username & password..

 

Might be that is the mistake I'm doing.

 

Please let me know..

 

Best regards,

Sree

 

  _____  

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

 

Try my testing project on your machine (I think lossy and buffer settings
has significant effect whether message is really sent or not, but always I
get no exception). If it works, search for differences in your project
(notice I am using log4net build from repository, it probably will not work
with release available on download page).

If not - your computer probably made god angry.

RR

 

  _____  

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

 

I've disabled the windows firewall & also the antivirus software but sill
got the below error.no change. :-(

 

 

Best regards,

Sree

 

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 3:22 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

One more idea - is there any antivirus / firewall software on the computer
you are doing your tests? It can block communication - I had to switch
outgoing mail checking off somewhere in the past....

RR

 


RE: Error while sending Mail to smtp.gmail.com

Posted by Radovan Raszka <ra...@hasam.cz>.
use username & password you are using when accesing you mail through web interface. Username should be your alias from email addres. If address is your.name@gmail.com, username should be your.name. But I don't know, if it is always true.
RR

________________________________

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



I found a change:

 

Wrt UserName & Password - what is the value we need to specify?

 

Till now I was using my gmail username & password..

 

Might be that is the mistake I'm doing...

 

Please let me know..

 

Best regards,

Sree

 

________________________________

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

 

Try my testing project on your machine (I think lossy and buffer settings has significant effect whether message is really sent or not, but always I get no exception). If it works, search for differences in your project (notice I am using log4net build from repository, it probably will not work with release available on download page).

If not - your computer probably made god angry.

RR

 

________________________________

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

 

I've disabled the windows firewall & also the antivirus software but sill got the below error...no change... :-(

 

 

Best regards,

Sree

 

 

________________________________

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 3:22 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

One more idea - is there any antivirus / firewall software on the computer you are doing your tests? It can block communication - I had to switch outgoing mail checking off somewhere in the past....

RR

 


RE: Error while sending Mail to smtp.gmail.com

Posted by Sree <sr...@gmail.com>.
I found a change:

 

Wrt UserName & Password - what is the value we need to specify?

 

Till now I was using my gmail username & password..

 

Might be that is the mistake I'm doing.

 

Please let me know..

 

Best regards,

Sree

 

  _____  

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

 

Try my testing project on your machine (I think lossy and buffer settings
has significant effect whether message is really sent or not, but always I
get no exception). If it works, search for differences in your project
(notice I am using log4net build from repository, it probably will not work
with release available on download page).

If not - your computer probably made god angry.

RR

 

  _____  

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

 

I've disabled the windows firewall & also the antivirus software but sill
got the below error.no change. :-(

 

 

Best regards,

Sree

 

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 3:22 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

One more idea - is there any antivirus / firewall software on the computer
you are doing your tests? It can block communication - I had to switch
outgoing mail checking off somewhere in the past....

RR

 


RE: Error while sending Mail to smtp.gmail.com

Posted by Radovan Raszka <ra...@hasam.cz>.
Try my testing project on your machine (I think lossy and buffer settings has significant effect whether message is really sent or not, but always I get no exception). If it works, search for differences in your project (notice I am using log4net build from repository, it probably will not work with release available on download page).
If not - your computer probably made god angry.
RR

________________________________

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



 

I've disabled the windows firewall & also the antivirus software but sill got the below error...no change... :-(

 

 

Best regards,

Sree

 

 

________________________________

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 3:22 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

One more idea - is there any antivirus / firewall software on the computer you are doing your tests? It can block communication - I had to switch outgoing mail checking off somewhere in the past....

RR

 


Re: Error while sending Mail to smtp.gmail.com

Posted by Ron Grabowski <ro...@yahoo.com>.
My suggestion would be to get email sending working using SmtpClient. There's nothing wrong with writing your own Appender. Here's one that I use for sending low volume ERROR and FATAL messages in a Medium Trust hosting environment:

    public class MediumTrustSmtpAppender : AppenderSkeleton
    {
        public string From { get; set;}
        public string To { get; set;}
        public string Subject { get; set;}
        public string Host { get; set;}

        protected override void Append(LoggingEvent loggingEvent)
        {
            MailMessage mailMessage = new MailMessage(From, To, Subject, RenderLoggingEvent(loggingEvent));
            SmtpClient smtpClient = new SmtpClient(Host);
            smtpClient.Send(mailMessage);
        }
    }




________________________________
From: Sree <sr...@gmail.com>
To: Log4NET User <lo...@logging.apache.org>
Sent: Tuesday, July 21, 2009 6:30:42 AM
Subject: RE: Error while sending Mail to smtp.gmail.com

 
 
I’ve disabled the windows firewall
& also the antivirus software but sill got the below error…no change… L
 
 
Best regards,
Sree
 
 

________________________________
 
From:Radovan Raszka
[mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 3:22
PM
To: Log4NET User
Subject: RE: Error while sending
Mail to smtp.gmail.com
 
One more idea - is there any antivirus /
firewall software on the computer you are doing your tests? It can block
communication - I had to switch outgoing mail checking off somewhere in the
past....
RR
 

________________________________
 
Od:Sree [mailto:sree.optust@gmail.com] 
Odesláno: 21. července 2009 11:02
Komu: ' Log4NET User '
Předmět: RE: Error while sending
Mail to smtp.gmail.com
 
But I’m getting error:
 
 
A first chance exception of type
'System.InvalidOperationException' occurred in log4netTests.exe
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. 22sm14461822wfd.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)
 
 
Do I need to do any other specific settings..
 
Please help me out…and I really Thank for ur responses…
 
Best regards,
Sree
 
 
 

________________________________
 
From:Radovan Raszka
[mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 1:15
AM
To: Log4NET User
Subject: RE: Error while sending
Mail to smtp.gmail.com
 
Works for me without any configuration
exception. I had only to change port to 25, why you are trying 465? My
config:
<appendername="SmtpAppender"type="log4net.Appender.SmtpAppender">
<tovalue="raszka@hasam.cz"/>
<fromvalue="myusername@gmail.com "/>
<subjectvalue="test logging message"/>
<smtpHostvalue="smtp.gmail.com"/>
<authenticationvalue= "Basic"/>
<usernamevalue= "username"/>
<passwordvalue= "mypassword"/>
<enablesslvalue="true"/>
<portvalue="25"/>
<bufferSizevalue="512"/>
<lossyvalue="false"/>
<evaluatortype="log4net.Core.LevelEvaluator">
<thresholdvalue="ALL"/>
</evaluator>
<layouttype="log4net.Layout.PatternLayout">
<conversionPatternvalue="%newline%date [%thread] %-5level %logger [%property{NDC}] -
%message%newline%newline%newline"/>
</layout>
</appender>
RR

________________________________
 
Od:Sree [mailto:sree.optust@gmail.com] 
Odesláno: 20. července 2009 9:50
Komu: ' Log4NET User '
Předmět: RE: Error while sending
Mail to smtp.gmail.com
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

RE: Error while sending Mail to smtp.gmail.com

Posted by Sree <sr...@gmail.com>.
 

I've disabled the windows firewall & also the antivirus software but sill
got the below error.no change. :-(

 

 

Best regards,

Sree

 

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 3:22 PM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

One more idea - is there any antivirus / firewall software on the computer
you are doing your tests? It can block communication - I had to switch
outgoing mail checking off somewhere in the past....

RR

 

  _____  

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

 

But I'm getting error:

 

 

A first chance exception of type 'System.InvalidOperationException' occurred
in log4netTests.exe

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. 22sm14461822wfd.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)

 

 

Do I need to do any other specific settings..

 

Please help me out.and I really Thank for ur responses.

 

Best regards,

Sree

 

 

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 1:15 AM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

Works for me without any configuration exception. I had only to change port
to 25, why you are trying 465? My config:

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

<to value="raszka@hasam.cz" />

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

<subject value="test logging message" />

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

<authentication value = "Basic" />

<username value = "username" />

<password value = "mypassword" />

<enablessl value ="true"/>

<port value ="25"/>

<bufferSize value="512" />

<lossy value="false" />

<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>

RR

  _____  

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

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

 


RE: Error while sending Mail to smtp.gmail.com

Posted by Radovan Raszka <ra...@hasam.cz>.
One more idea - is there any antivirus / firewall software on the computer you are doing your tests? It can block communication - I had to switch outgoing mail checking off somewhere in the past....
RR


________________________________

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



 

But I'm getting error:

 

 

A first chance exception of type 'System.InvalidOperationException' occurred in log4netTests.exe

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. 22sm14461822wfd.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)

 

 

Do I need to do any other specific settings..

 

Please help me out...and I really Thank for ur responses...

 

Best regards,

Sree

 

 

 

________________________________

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 1:15 AM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

Works for me without any configuration exception. I had only to change port to 25, why you are trying 465? My config:

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

<to value="raszka@hasam.cz" />

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

<subject value="test logging message" />

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

<authentication value = "Basic" />

<username value = "username" />

<password value = "mypassword" />

<enablessl value ="true"/>

<port value ="25"/>

<bufferSize value="512" />

<lossy value="false" />

<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>

RR

________________________________

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

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

 


RE: Error while sending Mail to smtp.gmail.com

Posted by Sree <sr...@gmail.com>.
 

But I'm getting error:

 

 

A first chance exception of type 'System.InvalidOperationException' occurred
in log4netTests.exe

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. 22sm14461822wfd.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)

 

 

Do I need to do any other specific settings..

 

Please help me out.and I really Thank for ur responses.

 

Best regards,

Sree

 

 

 

  _____  

From: Radovan Raszka [mailto:raszka@hasam.cz] 
Sent: Tuesday, July 21, 2009 1:15 AM
To: Log4NET User
Subject: RE: Error while sending Mail to smtp.gmail.com

 

Works for me without any configuration exception. I had only to change port
to 25, why you are trying 465? My config:

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

<to value="raszka@hasam.cz" />

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

<subject value="test logging message" />

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

<authentication value = "Basic" />

<username value = "username" />

<password value = "mypassword" />

<enablessl value ="true"/>

<port value ="25"/>

<bufferSize value="512" />

<lossy value="false" />

<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>

RR

  _____  

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

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

 


RE: Error while sending Mail to smtp.gmail.com

Posted by Radovan Raszka <ra...@hasam.cz>.
Works for me without any configuration exception. I had only to change port to 25, why you are trying 465? My config:
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">

<to value="raszka@hasam.cz" />

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

<subject value="test logging message" />

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

<authentication value = "Basic" />

<username value = "username" />

<password value = "mypassword" />

<enablessl value ="true"/>

<port value ="25"/>

<bufferSize value="512" />

<lossy value="false" />

<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>

RR

________________________________

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



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

 


RE: Error while sending Mail to smtp.gmail.com

Posted by Sree <sr...@gmail.com>.
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


RE: Error while sending Mail to smtp.gmail.com

Posted by Radovan Raszka <ra...@hasam.cz>.
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


RE: Error while sending Mail to smtp.gmail.com

Posted by Sree <sr...@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


RE: Error while sending Mail to smtp.gmail.com

Posted by Radovan Raszka <ra...@hasam.cz>.
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


RE: Error while sending Mail to smtp.gmail.com

Posted by Sree <sr...@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


RE: Error while sending Mail to smtp.gmail.com

Posted by Radovan Raszka <ra...@hasam.cz>.
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