geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r509954 - 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 Wed, 21 Feb 2007 09:52:00 GMT
Author: rickmcguire
Date: Wed Feb 21 01:51:56 2007
New Revision: 509954

URL: http://svn.apache.org/viewvc?view=rev&rev=509954
Log:
GERONIMO-2806 mail.null.host property not resolved by SMTPTransport class


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=509954&r1=509953&r2=509954
==============================================================================
--- 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
Wed Feb 21 01:51:56 2007
@@ -361,6 +361,12 @@
         if (mustAuthenticate && (username == null || password == null)) {
             return false;
         }
+        
+        
+    	// Before we do anything, let's make sure that we succesfully received a host
+    	if ( host == null ) {
+    		host = DEFAULT_MAIL_HOST;
+    	}
 
         // if the port is defaulted, then see if we have something configured in
         // the session.

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=509954&r1=509953&r2=509954
==============================================================================
--- 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
Wed Feb 21 01:51:56 2007
@@ -347,7 +347,7 @@
             debugOut("Connecting to server " + host + ":" + port + " for user " + username);
         }
 
-        // first check to see if we need to authenticate. If we need this, then
+        // now check to see if we need to authenticate. If we need this, then
         // we must have a username and
         // password specified. Failing this may result in a user prompt to
         // collect the information.
@@ -373,6 +373,11 @@
                 port = Integer.parseInt(configuredPort);
             }
         }
+    	
+    	// Before we do anything, let's make sure that we succesfully received a host
+    	if ( host == null ) {
+    		host = DEFAULT_MAIL_HOST;
+    	}
 
         try {
 



Mime
View raw message