Is there anything special about sending mail with JavaMail when using EJB?

Tim Rohaly

The javax.mail libraries are a standard part of of J2EE, so the whole API is there. Even the JavaBeans Activation Framework is there, which is required by JavaMail. However, you're only allowed to send mail, not receive.

With J2EE, you are required to obtain the javax.mail.Session instance from a JNDI lookup rather than creating it yourself, but other than that it's the same as sending mail using JavaMail from a standalone app.

You can look at the Java Pet Store example, which does this.

Also, see What does this messaging exception mean:
  No provider for Address type: rfc822

I am running a Weblogic on a Sun...

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact