You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Christian Hufgard <ch...@gmx.de> on 2004/01/22 22:22:02 UTC

Re[2]: unknown problem with SMTPAppender

Hi Ionel,

maybe you could post your hole config-file... You could also add
another appender to the class to want to send mails and watch if
something is loggeg there.
I configured the SMTPAppendern today, and had the problem that all
other appenders except this one worked. My mistake was, that I had a
log4j.ar within my WEB-INF/lib and _two_ different versions in
shared/lib. After removing them, everything worked fine.

greetz

Christian


Thursday, January 22, 2004, 9:41:58 PM,:


RS> Ionel,

RS> You don't need any other jars other then mail.jar and activation.jar - and
RS> if you did you would must likely get exception. 

RS> I'm Sorry but I can't think of anything else that could help you. 
RS> Raz.

RS> -----Original Message-----
RS> From: Ionel GARDAIS [mailto:igardais@yahoo.fr]
RS> Sent: Thursday, January 22, 2004 4:33 AM
RS> To: Log4J Users List
RS> Subject: RE: unknown problem with SMTPAppender


RS> Hi Raziel,

RS> I tried to use another SMTP server but I'm still
RS> getting no mails.

RS> sendmail's traffic is not logger so I looked at
RS> netstat to see if a connexion was established from my
RS> host.

RS> I see nothing !

RS> Again, when connecting using telnet, I see the
RS> connection established and I can send mail by command
RS> line

RS> Are there any packages other than activation.jar ans
RS> mail.jar I need to get the SMTPAppender works ?


RS> Thanks,
RS> Ionel

RS>  --- Raziel Steinmetz <rs...@ibasis.net> a écrit
: >> ionel,
>> 
>> I'm using the SMTPAppender and it is working very
>> well (on both windows and
>> Sun OS). if you don't get any exception from log4j
>> then I would go and check
>> your SMTP server log file to see if it got the email
>> to send, it could be
>> many reasons why you didn't got the email such as:
>> invalid email address, or
>> maybe the SMTP server queued your email for some
>> reason. 
>> 
>> SMTPAppender will send you an email as soon as it
>> gets a message with the
>> level that you defined (I think that the default
>> level is ERROR) the Buffer
>> size is the amount of prior messages that you will
>> see in the email - which
>> is great for troubleshooting, so I would recommend
>> to set it to much higher
>> then 1.
>> 
>> Good luck,
>> Raz Steinmetz.
>> 
>> -----Original Message-----
>> From: Ionel GARDAIS [mailto:igardais@yahoo.fr]
>> Sent: Wednesday, January 21, 2004 5:59 AM
>> To: log4j-user@jakarta.apache.org
>> Subject: unknown problem with SMTPAppender
>> 
>> 
>> Hi,
>> 
>> I am trying to use the SMTPAppender.
>> 
>> It is configured like that :
>> 
>>
RS> log4j.appender.mailer=org.apache.log4j.net.SMTPAppender
>> log4j.appender.mailer.from=user@domain.com
>> log4j.appender.mailer.to=user@domain.com
>> log4j.appender.mailer.subject=ProductPublisher
>> log4j.appender.mailer.SMTPHost=smtp@host.com
>> log4j.appender.mailer.bufferSize=1
>>
RS> log4j.appender.mailer.layout=org.apache.log4j.PatternLayout
>> log4j.appender.mailer.layout.ConversionPattern=%d
>> [%t]
>> %-5p %c - %m%n
>> 
>> 
>> but I receive no mail.
>> The mail.jar and activation.jar are present (log4j
>> does not complain)
>> The smtp host is accessible (can send mail via
>> telnet
>> commands)
>> The mailer appender is declared for the rootLogger.
>> Turning log4j.debug=true does not help.
>> 
>> I try to modify bufferSize to larger values but it
>> does not change a thing.
>> 
>> What is wrong ? Does anybody succeed in using the
>> SMTPAppender ?
>> BTW, about the bufferSize, does the mail is only
>> sent
>> when the buffer is full or is it sent every time a
>> log
>> message arrive ?
>> 
>> thanks
>> ionel
>> 
>>
RS> _________________________________________________________________
>> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et
>> en français !
>> Yahoo! Mail : http://fr.mail.yahoo.com
>> 
>>
RS> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail:
>> log4j-user-help@logging.apache.org
>>  

RS> _________________________________________________________________
RS> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
RS> Yahoo! Mail : http://fr.mail.yahoo.com

RS> ---------------------------------------------------------------------
RS> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
RS> For additional commands, e-mail: log4j-user-help@logging.apache.org



-- 
Mfg,
 Christian                            mailto:christian.hufgard@gmx.de


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org