I've been trying to figure out a way that I can configure log4J to send error emails. The problem is that our admins require me to use a non-default port to connect to the SMTP server. Log4J's SMTPAppender does not seem to be able to handle any port other than 25. Does anyone have any suggestions? Is there another implementation of an SMTPAppender available that I can use that allows the port to be specified? Thanks so much. Below is the configuration I have so far:
<appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Threshold" value="ERROR"/>
<param name="To" value="
[email protected]"/>
<param name="From" value="
[email protected]"/>
<param name="Subject" value="JBoss Sever Errors"/>
<param name="SMTPHost" value="fake.fake.com"/>
<param name="BufferSize" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
</layout>
</appender>
[ January 25, 2006: Message edited by: Anthony Watson ]