We were trying to send mail using weblogic5.0.1 and we have got the following error
this is the error message we have got. Could you please clarify/suggest/advice?
message................
javax.mail.NoSuchProviderException: No provider for Address
type: rfc822
javax.mail.NoSuchProviderException: No provider for Address
type: rfc822
at javax.mail.Session.getTransport(Session.java:475)
at javax.mail.Transport.send0(Transport.java:154)
at javax.mail.Transport.send(Transport.java:80)
at
SendMailBean.sendSmtp(SendMailBean.java:475
)
at jsp_servlet._email._compose._jspService_compose.java:164)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:105)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:123)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
textImpl.java:742)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
textImpl.java:686)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
ContextManager.java:247)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
a:361)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
-
sending mail using java mail api using weblogic as webserver (2 messages)
- Posted by: Pavan Bhaskara
- Posted on: November 28 2000 06:01 EST
Threaded Messages (2)
- sending mail using java mail api using weblogic as webserver by Greg Comeau on November 28 2000 10:49 EST
- sending mail using java mail api using weblogic as webserver by Dimitri Rakitine on December 01 2000 03:01 EST
-
sending mail using java mail api using weblogic as webserver[ Go to top ]
- Posted by: Greg Comeau
- Posted on: November 28 2000 10:49 EST
- in response to Pavan Bhaskara
Make sure mail.jar is in your classpath. Please post a code snippet that shows how you set up the mail session and send the message. Here's a snippet that works for me. I've doctored it up to indicate where your vars would be inserted:
Properties props = System.getProperties();
props.put ("mail.smtp.host", "your.smtp.host");
Session mailSession = Session.getDefaultInstance (props, null);
Message msg = new MimeMessage (mailSession);
InternetAddress[] from = {
new InternetAddress ("email address of sender", "personal name of sender") };
msg.setFrom (from[0]);
msg.addRecipient (Message.RecipientType.TO,
new InternetAddress ("Recipient's email address", "Recipient's name"));
msg.setSubject ("the subject");
msg.setText ("the body of the message");
// You could also use msg.setContent(..., ...);
msg.setSentDate (new java.util.Date());
Transport.send (msg);
-
sending mail using java mail api using weblogic as webserver[ Go to top ]
- Posted by: Dimitri Rakitine
- Posted on: December 01 2000 03:01 EST
- in response to Pavan Bhaskara
Use service pack 6 - it now includes mail-related properties files in it's META-INF/