--- SMTPAppender.java	Mon Jul 14 11:04:21 2003
+++ patched/SMTPAppender.java	Tue Feb 10 16:35:27 2004
@@ -43,10 +43,13 @@
    @author Ceki G&uuml;lc&uuml;
    @since 1.0 */
 public class SMTPAppender extends AppenderSkeleton {
+	private static final int DEFAULT_SMTP_PORT = 25;
+
   private String to;
   private String from;
   private String subject;
   private String smtpHost;
+  private int smtpPort = DEFAULT_SMTP_PORT;
   private int bufferSize = 512;
   private boolean locationInfo = false;
 
@@ -84,6 +87,8 @@
     Properties props = new Properties (System.getProperties());
     if (smtpHost != null)
       props.put("mail.smtp.host", smtpHost);
+		if (smtpPort != 25)
+			props.put("mail.smtp.port", String.valueOf(smtpPort));
 
 
     Session session = Session.getInstance(props, null);
@@ -316,6 +321,23 @@
   String getSMTPHost() {
     return smtpHost;
   }
+
+  /**
+     The <b>SMTPPort</b> option takes an int value which should be the port
+     number of the SMTP server that will send the e-mail message.
+   */
+  public
+  void setSMTPPort(int port) {
+		this.smtpPort = port;
+	}
+
+	/**
+	   Returns value of the <b>SMTPPort</b> option.
+ 	 */
+	public
+	int getSMTPPort() {
+		return smtpPort;
+	}
 
   /**
      The <b>To</b> option takes a string value which should be a

