how can I make my perl cgi script email to a newsgroup 
Author Message
 how can I make my perl cgi script email to a newsgroup

I have a perl script and I want to be able to have it automatically
email a post to
rec.music.makers.marketplace
How do I do it. I've been pulling my hair out for months trying to
figure this out.
Please help. I don't lurk here often so if you can please send me an



Wed, 24 Jan 2001 03:00:00 GMT  
 how can I make my perl cgi script email to a newsgroup

Quote:

> Subject: how can I make my perl cgi script email to a newsgroup

If you want to be able to send email to a newsgroup, you need a gateway
from email to Usenet. The docs, FAQs, and newsgroups about Usenet should
be able to help you with that problem. Of course, if you merely want to
post to Usenet, you should be able to do that with the Net::NNTP module
which you'll find on CPAN. Hope this helps!

--
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



Wed, 24 Jan 2001 03:00:00 GMT  
 how can I make my perl cgi script email to a newsgroup
use Net::NNTP;

$nntp = Net::NNTP->new("news.at.your.server");

$nntp->post();

$nntp->datasend("Newsgroups: alt.test\n");
$nntp->datasend("Subject: Hoffi's test\n");
$nntp->datasend("\n");
$nntp->datasend("\n");
$nntp->datasend("Hi!\n");
$nntp->datasend("\n");
$nntp->datasend("This is the Body\n");
$nntp->datasend("seperated from the header by two newlines\n");
$nntp->datasend("\n");
$nntp->datasend("Hoffi\n");
$nntp->dataend();

$nntp->quit;

-- -------------------+   _\\|//_  
+--------------------------------------+
| Dirk Hoffmann G105  |  (` o-o ')  |  eMail:  

| Klosterweg 28       +-ooO-(_)-Ooo-+        or  

| 76131 Karlsruhe     _______________  www:    
www.uni-karlsruhe.de/~uk1s |



Sun, 28 Jan 2001 03:00:00 GMT  
 how can I make my perl cgi script email to a newsgroup

Quote:

> $nntp->datasend("seperated from the header by two newlines\n");

I detected a perity error.

:-}



Sun, 28 Jan 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. question about canned perl script

2. Troubles with a Canned script

3. canned reply script

4. Perl/CGI script to validate email addresses

5. Perl CGI Script EMails nothing

6. Need a email perl/cgi script

7. Emailing something from a perl CGI script

8. cgi-perl email script?

9. Need help finding/making a cgi script

10. CGI Script for making "cookies"

11. Help needed: parsing newsgroup for email

12. this newsgroup relayed by email or such ...

 

 
Powered by phpBB® Forum Software