Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Posting to newsgroups with JavaMail

2 views
Skip to first unread message

Darryl L. Pierce

unread,
May 22, 2002, 12:17:47 PM5/22/02
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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-----

Thomas Weidenfeller

unread,
May 22, 2002, 11:46:40 AM5/22/02
to
"Darryl L. Pierce" <mcpi...@telocity.com> writes:
> 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?

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

Roedy Green

unread,
May 22, 2002, 4:13:11 PM5/22/02
to
On Wed, 22 May 2002 11:17:47 -0500, "Darryl L. Pierce"
<mcpi...@telocity.com> wrote or quoted :

>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

Darryl L. Pierce

unread,
May 22, 2002, 8:43:01 PM5/22/02
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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-----

Darryl L. Pierce

unread,
May 22, 2002, 8:43:24 PM5/22/02
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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-----

Thomas Weidenfeller

unread,
May 23, 2002, 4:00:25 AM5/23/02
to
"Darryl L. Pierce" <mcpi...@telocity.com> writes:
> Someone else suggested the software
> for nntp wasn't included in JavaMail.

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

0 new messages