DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41480>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41480

           Summary: SMTPAppender should have an SMTPPort property
           Product: Log4j
           Version: 1.2
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: Appender
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Many users have requested this, and I imagine there have been hundreds, if not
thousands of "MySMTPAppender" subclasses written just to have a property to
specify the SMTP port (I had to write one myself to get by).  The default port
is 25, but many SMTP servers listen on a different port.

I simply added another property in activateOptions() as follows:

props.put("mail.smtp.port", this.smtpPort);


Related additions:

private String smtpPort = "25";  // default

public String getSMTPPort()
{
        return this.smtpPort;
}

public void setSMTPPort(String smtpPort)
{
        this.smtpPort = smtpPort;
}


Is there a reason why this property wasn't in the original implementation, other
than just an oversight on the implementer's part?  One Google search for "log4j
smtpappender port" turned up this from 3 years ago:

http://mail-archives.apache.org/mod_mbox/logging-log4j-dev/200402.mbox/[EMAIL 
PROTECTED]

I'm guessing the (apparently) submitted patch was rejected for some reason?

Thanks for the excellent logging framework!
Ari Meyer

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to