This discussion is archived
2 Replies Latest reply: Mar 6, 2012 11:39 PM by 919944 RSS

A question regarding JavaMail API

919944 Newbie
Currently Being Moderated
Hey there,

In the JavaMail API documentation I see there are two packages: javax.mail.* and com.sun.mail.*
- Does the first package define classes and interfaces for API specification?
- Does the second one contain real implementation stuff?

As I see most of examples deal with the first one.
  • 1. Re: A question regarding JavaMail API
    DrClap Expert
    Currently Being Moderated
    Basically, yes. You shouldn't generally be using the "com.sun" classes unless you have really, really strange requirements. And maybe not even then. Here's a quote from the Javadoc for one of those com.sun packages:
    These utility classes are not part of the JavaMail specification. While this package contains many classes used by the JavaMail implementation and not intended for direct use by applications, the classes documented here may be of use to applications.
  • 2. Re: A question regarding JavaMail API
    919944 Newbie
    Currently Being Moderated
    I got it. Thank you for your clear explanation.
    Have a nice day:)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points