geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r510528 - in /geronimo/javamail/trunk: geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/ geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/
Date Thu, 22 Feb 2007 14:18:38 GMT
Author: rickmcguire
Date: Thu Feb 22 06:18:37 2007
New Revision: 510528

URL: http://svn.apache.org/viewvc?view=rev&rev=510528
Log:
GERONIMO-2867 javax.mail.Service.connect() not using port from transport URLName()


Modified:
    geronimo/javamail/trunk/geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java
    geronimo/javamail/trunk/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java

Modified: geronimo/javamail/trunk/geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java?view=diff&rev=510528&r1=510527&r2=510528
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java
(original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java
Thu Feb 22 06:18:37 2007
@@ -343,9 +343,6 @@
      */
     protected boolean protocolConnect(String host, int port, String username, String password)
             throws MessagingException {
-        if (debug) {
-            debugOut("Connecting to server " + host + ":" + port + " for user " + username);
-        }
 
         // first check to see if we need to authenticate. If we need this, then
         // we must have a username and
@@ -379,6 +376,10 @@
                 port = Integer.parseInt(configuredPort);
             }
         }
+        
+        if (debug) {
+            debugOut("Connecting to server " + host + ":" + port + " for user " + username);
+        }
 
         try {
 
@@ -1562,7 +1563,10 @@
             // get what the InternetAddress class believes to be the local
             // address.
             else {
-                from = InternetAddress.getLocalAddress(session).getAddress();
+                InternetAddress local = InternetAddress.getLocalAddress(session);
+                if (local != null) {
+                    from = local.getAddress(); 
+                }
             }
         }
 

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java?view=diff&rev=510528&r1=510527&r2=510528
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java
(original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransport.java
Thu Feb 22 06:18:37 2007
@@ -1561,7 +1561,10 @@
             // get what the InternetAddress class believes to be the local
             // address.
             else {
-                from = InternetAddress.getLocalAddress(session).getAddress();
+                InternetAddress local = InternetAddress.getLocalAddress(session);
+                if (local != null) {
+                    from = local.getAddress(); 
+                }
             }
         }
 



Mime
View raw message