What version of Camel are you using? And what JDK, and JavaMail API Jar version are you using?
Have you tried upgrading and using the newer Camel release? On Wed, Aug 10, 2011 at 9:51 AM, ravi <ravi.ty...@esq.com> wrote: > Tried Sample program to send mail using Java Mail Apis and it is working fine > but Camel SMTP is not working: Code is given below to send mail uysing > Sample Program: > > public class SendMailSSL { > public static void main(String[] args) { > Properties props = new Properties(); > props.put("mail.smtp.host", "smtp.gmail.com"); > props.put("mail.smtp.socketFactory.port", "465"); > props.put("mail.smtp.socketFactory.class", > "javax.net.ssl.SSLSocketFactory"); > props.put("mail.smtp.auth", "true"); > props.put("mail.smtp.port", "465"); > > Session session = Session.getDefaultInstance(props, > new javax.mail.Authenticator() { > protected PasswordAuthentication getPasswordAuthentication() { > return new PasswordAuthentication("username","password"); > } > }); > > try { > > Message message = new MimeMessage(session); > message.setFrom(new InternetAddress("f...@abc.com")); > message.setRecipients(Message.RecipientType.TO, > InternetAddress.parse("t...@xyz.com")); > message.setSubject("Testing Subject"); > message.setText("Dear," + > "\n\n No spam please!"); > > Transport.send(message); > > System.out.println("Done"); > > } catch (MessagingException e) { > throw new RuntimeException(e); > } > } > } > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/CAMEL-SMTP-Mail-Componenet-Issue-on-64-Bit-Windows-2008-Server-tp4681784p4684978.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/