there is no
import javax.mail.*;
in my java and net beans so how can i get those packages or what i have to do for importing that

Such question can be answer by simple google search
Presuming that what ever you do is Web Project than in you should add mail archive to lib folder that can be found as PATH_TO_PROJECT/web/WEB-INF/lib. If the "lib" folder does not exist created it in described location and drop the jar file there. NetBeans should take care of rest of it