package javax.mail does not exist import javax.mail.*;
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   anil_khobariya
Posted On:   Sunday, November 7, 2004 11:09 PM

i am making a jsp page to send email to two persons from another jsp page automatically but when i import the javax package exception occures . the exception is package javax.mail does not exist i have placed this javax package in the classes folder of web-inf folder which is in my projects folder.and placed the mail.jar file in servers lib directory . i am using this code just for testing that this code can send mail or not the code is : <%@page language="java" import="java.util.*,javax.mail.*,javax.mail.internet.*" %> <% SmtpSender smtp=SmtpSender.getInstance(); MailToBeSent send=new MailToBeSent(); send.setSubject("Hello"); send.setFromAddress("per   More>>

i am making a jsp page to send email to two persons from another jsp page automatically but when i import the javax package exception occures . the exception is
package javax.mail does not exist
i have placed this javax package in the classes folder of web-inf folder which is in my projects folder.and placed the mail.jar file in servers lib directory .
i am using this code just for testing that this code can send mail or not the code is :
<%@page language="java" import="java.util.*,javax.mail.*,javax.mail.internet.*" %>
<%
SmtpSender smtp=SmtpSender.getInstance();
MailToBeSent send=new MailToBeSent();
send.setSubject("Hello");
send.setFromAddress("person1@rediffmail.com","Someone");
send.addToAddress("person2@yahoo.co.in","Anotherone");
send.setBody("Hello, this is test!");
smtp.sendMail(send);


%>

please give some guidence how it will do

   <<Less

Re: package javax.mail does not exist import javax.mail.*;

Posted By:   Anonymous  
Posted On:   Wednesday, December 22, 2004 06:23 AM

Re: package javax.mail does not exist import javax.mail.*;

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, November 9, 2004 05:21 PM

Put the mail.jar and activation.jar files in your webapp's WEB-INF/lib directory (inside the .war file).
About | Sitemap | Contact