Bug 24969

Summary: SMTPAppender should be able to do auth
Product: Log4j - Now in Jira Reporter: Ralf Hauser <hauser>
Component: AppenderAssignee: log4j-dev <log4j-dev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
URL: http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/net/SMTPAppender.html
Attachments: Patch file to add AUTH support to the email appender
Improved AUTH patch

Description Ralf Hauser 2003-11-25 12:12:14 UTC
Due to the UCE aka Spam pest, more and more smtp servers get protected by
login/password.

It would be great if the SMTPAppender could also send out mails via such smtp
servers!
Comment 1 Ralf Hauser 2003-12-09 09:15:38 UTC
see also Bug 25355 for link confidentiality for such outgoing mails
Comment 2 Evan 2005-04-25 16:35:31 UTC
Created attachment 14831 [details]
Patch file to add AUTH support to the email appender

Add the following to your appender config to allow SMTP server authentication:

<param name="SMTPUsername" value="username"/>
<param name="SMTPPassword" value="password"/>

If either the username or password are missing the appender will behave as
before.
Comment 3 Evan 2005-04-26 15:32:25 UTC
Created attachment 14843 [details]
Improved AUTH patch

Improved the patch to include an SMTPDebug option (this enables mail session
debugging).

Add the following to your appender config to allow SMTP server authentication:

<param name="SMTPUsername" value="username"/>
<param name="SMTPPassword" value="password"/>
<param name="SMTPDebug" value="true"/>

If either the username or password are missing the appender will behave as
before.
Comment 4 Curt Arnold 2006-08-31 19:29:31 UTC
Modified patch committed in rev 439024 (1.2) and 430925 (trunk).  Added extension point createSession() 
if you want to do other types of authentication in extended classes.