• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Log4j - Problem in using SMTPAppender with gmail

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm using Log4j as the logging framework and I've configured it to send an email with log information when a log with ERROR/FATAL logging level is created.My Log4j configuration is as follows.




But whenever a log with ERROR/FATAL logging level is created, Log4j tries to send the email but terminates it with the following exception..



Can anybody point out where the problem is?

Thanks in advance!
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

Check your antivirus settings. Generally antivirus won't allow to send emails using some other program (log4j). Go to properties of antivirus in your system try and check there you must find one option related to email sending just check or uncheck (if it is checked) it will work fine.

I have implement the same thing but I have used log4j.properties not .xml check this out any way...
http://sirishg.blogspot.com/2008/08/error-reporting-through-e-mail-using.html

-Sirish
[ September 19, 2008: Message edited by: Sirish Kumar Gongal Reddy ]
 
Khp Virajith
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sirish,

Thank you for your reply. But the fact you pointed out is not the issue with my application .Because, my application has email sending functionalities in Reporting Module and they work fine without any error. Therefore that error isn't just because of the Antivirus settings.

I did a deep google search on this and tried to find whether there's any XML configuration tag that I've missed but couldn't find any missing item yet.

My concern is about the 1st line of the error message.which is,



What is "STARTTLS" and how to issue that command from Log4j Configuration?

Any Help from the experts?

Regards,
VIRAJ
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic