2 Replies Latest reply: Mar 7, 2012 1:39 AM by 919944 RSS

    A question regarding JavaMail API

    919944
      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
          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
            I got it. Thank you for your clear explanation.
            Have a nice day:)