[ https://issues.apache.org/jira/browse/CAMEL-4161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Whytock updated CAMEL-4161: ---------------------------------- Attachment: new_SpringJavaMailSender.java new_MimeMessagePreparator.java new_JavaMailSender.java new_DefaultJavaMailSender.java MailProducer.java MailEndpoint.java MailConsumer.java MailConfiguration.java diff_MailProducer.java diff_MailEndpoint.java diff_MailConsumer.txt diff_MailConfiguration.txt JavaMailSender.java and MimeMessagePreparator.java are local versions of these two interfaces. SpringJavaMailSender.java is a wrapper class that extends the Spring JavaMailSenderImpl and ties it to the local interfaces. DefaultJavaMailSender.java performs the functions of a sender if the Spring sender isn't available. The modified MailConfiguration.java attempts to instantiate SpringJavaMailSender, and, on failure, instead instantiates DefaultJavaMailSender. Changes to the other classes tie them to the local JavaMailSender interface. These should be accompanied by a change to the Maven configuration, so that the dependency on org.springframework.mail.javamail is optional. > make camel-mail dependency on Spring's JavaMailSenderImpl optional > ------------------------------------------------------------------ > > Key: CAMEL-4161 > URL: https://issues.apache.org/jira/browse/CAMEL-4161 > Project: Camel > Issue Type: Improvement > Components: camel-mail > Reporter: Donald Whytock > Priority: Minor > Attachments: JavaMailSender.java, JavaMailSenderImpl.java, > MailConfiguration.java, MailConsumer.java, MailEndpoint.java, > MailProducer.java, MimeMessagePreparator.java, diff_MailConfiguration.txt, > diff_MailConsumer.txt, diff_MailEndpoint.java, diff_MailProducer.java, > new_DefaultJavaMailSender.java, new_JavaMailSender.java, > new_MimeMessagePreparator.java, new_SpringJavaMailSender.java > > > camel-mail is currently dependent on > org.springframework.mail.javamail.JavaMailSenderImpl, but uses relatively > little of its functionality. In many cases it may be sufficient to fall back > on a default JavaMailSenderImpl that only implements the bare minimum > necessary to send mail, similar to how Management functionality falls back on > DefaultManagementStrategy if the Spring JMX implementation is not available. > This would make camel-mail use possible in an otherwise Spring-less > application. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira