camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CAMEL-7431) Impossible to use an existing javax.mail.Session with DefaultJavaMailSender
Date Tue, 13 May 2014 07:54:14 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-7431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Willem Jiang reassigned CAMEL-7431:
-----------------------------------

    Assignee: Willem Jiang

> Impossible to use an existing javax.mail.Session with DefaultJavaMailSender
> ---------------------------------------------------------------------------
>
>                 Key: CAMEL-7431
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7431
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 2.13.0
>         Environment: Windows 8.1.1, Oracle JDK6u45, JavaMail 1.4.7
>            Reporter: Pierre Maréchal
>            Assignee: Willem Jiang
>
> When using DefaultJavaMailSender with an existing javax.mail.Session instance (i.e. retrieved
from JNDI) it is not possible to leave host and port unconfigured.
> My JavaMailSender is configured as follows:
>     @Bean
>     public JavaMailSender mailSender() {
>         JavaMailSender jms = new DefaultJavaMailSender();
>         jms.setSession(mailSession);
>         jms.setProtocol("smtp");
>         return jms;
>     }
> mailSession is a preconfigured Session instance retrieved from JNDI registry. I do not
know about it's configuration.
> When calling the send() method, it tries to connect using the connect(host, port, username,
password) method passing the (unconfigured) host and port which defaults to localhost:0 and
then fails.
> In case the session is supplied, it should call connect() instead.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message