This doesn't have anything with the AS to do but eclipse needs the javamail api on the classpath.
Unfortunately it is also a problem with AS7 as maven also shows the same errors. Eclipse is properly showing the problem that actually exists.
What do you have in your pom.xml?
I generally just throw in
<dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-6.0</artifactId> <version>3.0.2.Final</version> <type>pom</type> <scope>provided</scope> </dependency>
for anything going into the AS, I think the mail api should be in there, too.
That was it. I had to add:
into the pom.xml file.
One would have thought that since mail is built-in and operational, the dependencies would have been taken care of already.
Seems I have more to learn.