I have imported the below package in my sling servlet but getting below errors, please help to resolve the issue. I am using AEM 6.4
package javax.mail.internet does not exist
class file for javax.mail.MessagingException not found
In POM.xml used the below dependency
Could you please confirm if you have added this dependency in parents pom and core pom?
in core package add a dependency in POM without version and in parent pom with version.
This one is also correct answer Thanks a lot
Check this package on your depfinder - i am seeing it fine:
This can happen when the particular dependency is not available in your felix console. You can go to http://localhost:4502/system/console/depfinder
and find the dependencies available . When I check the depfinder for javax.mail , I can find below dependency available.