Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Mail on linux?

843830Dec 5 2003 — edited May 31 2005
Hello,

Code below works good in Windows XP, but not in Linux.
In Linux OS I've got an exception after Transport.send(msg,msg.getAllRecipients());

Where is the problem? Seems like java mail don't works in linux?
I guess the problem : can't get smtp provider in linux system.

Any ideas about this topic would be very very usefull.
Thanks
Ljosika

This is my Code :

Properties props = new Properties();
props.put("mail.smtp.host", "trap.mebius.lv");

// create some properties and get the default Session
ses = Session.getDefaultInstance(props, null);
msg = new MimeMessage(ses);
......
// prepare msg for sending
.......

Transport.send(msg,msg.getAllRecipients());


This is an Exception :

javax.mail.NoSuchProviderException: No provider for Address type: rfc822
at javax.mail.Session.getTransport(Session.java:516)
at javax.mail.Transport.send0(Transport.java:155)
at javax.mail.Transport.send(Transport.java:103)
at mebius.sls.notification.MailSender.sendUnicodeMail(MailSender.java:76)
at mebius.sls.notification.NotificationProcess.sendMail(NotificationProcess.java:117)
at mebius.sls.notification.NotificationProcess.processRecords(NotificationProcess.java:82)
at mebius.sls.notification.NotificationProcess.actionPerformed(NotificationProcess.java:186)
at mebius.sls.notification.NotificationProcess.main(NotificationProcess.java:146)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2005
Added on Dec 5 2003
13 comments
1,386 views