tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fought,Tom" <>
Subject RE: send a mail
Date Wed, 30 Jan 2002 14:27:05 GMT

This is what I found as necessary to make this work:

First of all you need
javamail-1.2 (of course) AND!

I expect you have these.

Next I found the following code snippet required, otherwise
I got the same error...

// using java mail
Properties props = System.getProperties();
props.put( "", pConfig.getConfig( "Mail.MailHost" ) );
props.put( "mail.transport.protocol", pConfig.getConfig( "Mail.Transport" )
javax.mail.Session mSession =
       javax.mail.Session.getDefaultInstance( props, null );

The key here is the "mail.transport.protocol". The providerexception is
referring to this if my memory serves me. You need to specify a transport
protocol, i.e. "smtp", for the session/provider and this is done through
the properties. My "smtp" retrieved from a config file.

This comment from Sun has a lot of value:
It is expected that the client supplies values for the properties listed in
Appendix A of the JavaMail spec (particularly,
mail.transport.protocol,, mail.user, and mail.from) as the
defaults are unlikely to work in all cases.

Good Luck

-----Original Message-----
From: Anton Brazhnyk []
Sent: Wednesday, January 30, 2002 9:07 AM
To: Tomcat Users List
Subject: RE: send a mail


> -----Original Message-----
> From: Nancy Crisostomo Martinez []
> Sent: Wednesday, January 30, 2002 12:26 AM
> To: Tomcat Users List
> Subject: send a mail
> Hi  everybody!
> I'm having some troubles with sending an e-mail from a servlet I have
> running on Tomcat 3.3 and Solaris.
> I have a servlet which use Java Mail API to send an e-mail, but when I
> press the button to send an e-mail  this error appear on console:
>           javax.mail.NoSuchProviderException: No provider for 
> Address type:
> rfc822
> Could you tell me why does this message appear? and How can I fix it?
> Thank you in advance!!

Hmm, it's strange. Looks like you dont have all jars required even though
standart JavaMail is supposed to contain provider for rfc822.
Does standalone application work fine?

> Nancy.


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message