camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon IJskes (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (CAMEL-12117) custom javaMailSender does not benefit from URL parameters
Date Wed, 03 Jan 2018 14:55:00 GMT

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

Simon IJskes updated CAMEL-12117:
---------------------------------
    Comment: was deleted

(was: {{    @Override
    public void send( MimeMessage mimeMessage )
        throws MessagingException
    {

........

            LOG.debug( "Sending MimeMessage: {} using host: {}", mimeMessage, host );

            String[] recipients = mimeMessage.getHeader( "X-Recipient" );

            if( recipients == null || recipients.length == 0 ) {
                transport.sendMessage( mimeMessage, mimeMessage.getAllRecipients() );
            } else {
                InternetAddress ra[] = new InternetAddress[recipients.length];
                for( int i = 0; i < recipients.length; i++ ) {
                    ra[i] = new InternetAddress( recipients[i], true );
                }
                transport.sendMessage( mimeMessage, ra );
            }
}})

> custom javaMailSender does not benefit from URL parameters
> ----------------------------------------------------------
>
>                 Key: CAMEL-12117
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12117
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mail
>    Affects Versions: 2.20.1
>            Reporter: Simon IJskes
>         Attachments: new.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> When a custom javaMailSender is used, no property setters are called on the custom javaMailSender.
This in constrast with the DefaultJavaMailSender. 
> In MailEndpoint.createProducer() the custom javaMailSender does not get the 'replication'
of the configuration properties as the createJavaMailSender() does.
> The benefit of using the URL parameters is, when a custom sender is specified by reference,
and it is pulled from the spring registry, and is marked as "prototype" scope, it allows the
URL to configure this newly created custom sender, thereby allowing multiple configured smtp
producers from camel.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message