I'm playing around with the Javamail API and am having a problem posting
to Usenet using the API. When I execute, I get the message:
mailtest:
[java] javax.mail.NoSuchProviderException: No provider for nntp
[java] at javax.mail.Session.getProvider(Session.java:289)
[java] at javax.mail.Session.getTransport(Session.java:483)
[java] javax.mail.NoSuchProviderException: No provider for nntp
[java] at javax.mail.Session.getTransport(Session.java:464)
[java] at javax.mail.Session.getTransport(Session.java:450)
[java] at other.MailTest.sendNews(MailTest.java:28)
[java] at other.MailTest.main(MailTest.java:85)
Where is the NNTP provider defined? I've included all JARs from the
javamail directory in my classpath and nothing's doing the trick. Any
help?
- --
/**
* @author Darryl L. Pierce <mcpi...@databasix.com>
* @website The Infobahn Offramp <http://welcome.to/mcpierce>
* @quote "Friends don't let friends write scriptlets."
*/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE868Sr6LwNshk1tGERApUGAKCviKLGxx6Y6gHADlIq5O2AnQzlyQCgh/OC
nJWGCZ0hC/zYFbq1eIAkHBY=
=YZcD
-----END PGP SIGNATURE-----
JavaMail does not come with a NNTP provider. But there are several 3pp
providers available. Serach the web, and have a look at Sun's JavaMail
FAQ at the Sun web site.
/Thomas
>Where is the NNTP provider defined?
I suspect you are doing a Session.send instead of Session.sendMessage.
--
The answers to most beginner Java questions are in the
Java glossary indexed and cross-indexed by keyword.
It is usually faster to look them up there than ask
here and wait for a response. See:
http://www.mindprod.com/jgloss.html
or http://209.139.205.39/jagg.html
-
eagerly seeking telecommuting programming work.
canadian mind products, roedy green
Roedy Green <ro...@mindprod.com> wrote:
>>Where is the NNTP provider defined?
> I suspect you are doing a Session.send instead of Session.sendMessage.
No luck. You're right, though, I was using send(Message) and setting the
newsgroup list via setRecipients(). Someone else suggested the software
for nntp wasn't included in JavaMail. Is this your experience as well?
- --
/**
* @author Darryl L. Pierce <mcpi...@databasix.com>
* @website The Infobahn Offramp <http://welcome.to/mcpierce>
* @quote "Friends don't let friends write scriptlets."
*/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE87DsV6LwNshk1tGERAsbwAKChl9ddKTBaEelJekwlOmOTuqzFYACfbFlt
zr78YVQj36nFPydzOTsFYlY=
=wsvD
-----END PGP SIGNATURE-----
Thanks. I'll do that. =)
- --
/**
* @author Darryl L. Pierce <mcpi...@databasix.com>
* @website The Infobahn Offramp <http://welcome.to/mcpierce>
* @quote "Friends don't let friends write scriptlets."
*/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE87Dss6LwNshk1tGERAgVmAJ4wj0JUpNfONKVpQ/vM2dMJgt0jXACeMJ9w
cAGe6Jf+FRX+1eso/rGIjh0=
=SYkw
-----END PGP SIGNATURE-----
That was me, and if you check Sun's FAQ for JavaMail, esp.
http://java.sun.com/products/javamail/FAQ.html#otherprovs
you will see that Sun agree with me :-)
/Thomas