camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] git commit: CAMEL-7431 fixed the default port issue of DefaultJavaMailSender
Date Tue, 13 May 2014 12:31:15 GMT
CAMEL-7431 fixed the default port issue of DefaultJavaMailSender


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4ede10a2
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4ede10a2
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4ede10a2

Branch: refs/heads/master
Commit: 4ede10a2aab8f021e58548714449a4cf7318c5b5
Parents: 8b306d0
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Tue May 13 16:44:20 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Tue May 13 20:29:57 2014 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/mail/DefaultJavaMailSender.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4ede10a2/components/camel-mail/src/main/java/org/apache/camel/component/mail/DefaultJavaMailSender.java
----------------------------------------------------------------------
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/DefaultJavaMailSender.java
b/components/camel-mail/src/main/java/org/apache/camel/component/mail/DefaultJavaMailSender.java
index 2eb3ac0..f9bf404 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/DefaultJavaMailSender.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/DefaultJavaMailSender.java
@@ -38,7 +38,8 @@ public class DefaultJavaMailSender implements JavaMailSender {
     private String host;
     private String username;
     private String password;
-    private int port;
+    // -1 means using the default port to access the service
+    private int port = -1;
     private String protocol;
     private Session session;
 
@@ -109,7 +110,6 @@ public class DefaultJavaMailSender implements JavaMailSender {
         Transport transport = getTransport(getSession());
         LOG.debug("Connecting to {}:{}", host, port);
         transport.connect(getHost(), getPort(), getUsername(), getPassword());
-
         try {
             if (mimeMessage.getSentDate() == null) {
                 mimeMessage.setSentDate(new Date());


Mime
View raw message