Below is one of the targets that runs after the completion of tests, buil.xml(pass or fail). This target is failing and giving error "java.lang.ClassNotFoundException: javax.mail.internet.MimeMessage". So I expanded the mail.1.4.jar file and saw this class was there. So next I checked that this jar was there in my setclasspath target or not, and it was there. Third thing I checked that mail.1.4.jar was included in ant's path or not and it was there. Now I am not able to understand why I am getting this error.
<target name="sendmail">
<mail from="[myname@company.com]"
subject="Test Email" mailhost="smpt.gmail.com"
user="myusername" password="mypassword" message="This is a test email">
<to name="receivers name" address="[receiver@gmail.com]" />
</mail>
</target>