Article View: news.software.readers
Article #41347Re: Really Tough Question
From: Kaz Kylheku
Date: Fri, 05 Jun 1998 00:00
Date: Fri, 05 Jun 1998 00:00
37 lines
2034 bytes
2034 bytes
In article <3577403F.9D082817@eng.sun.com>,
Amjad Alhait <alhait@eng.sun.com> wrote:
> open(MAIL, "|$mailer -t") || die "Can't open $mailer!\n";
> print MAIL "To: $aliasmail\n";
> print MAIL "From: $FORM{'email'}\n";
> print MAIL "Subject: $FORM{'subject'}\n\n";
> print MAIL "$FORM{'body'}\n";
> print MAIL "\n";
> close (MAIL);
>
>Anyone knows of a way to do this with news? I need to post to a
>newsgroup using the same way. is there a news reader/post prog that will
>enable me to do this?
Yes, the program in called ``inews''. You give it the -h argument
and then pipe the article (header and body) to its standard input.
You can also give it a -D argument which will cause it to not post
to the NNTP server, but just print the article to standard output.
You should be prepared for inews to yield a failed exit status, which
means that something was wrong with the article.
Also, you don't have to supply a full header. Some things can be handled
on the inews command line; for example, a From: line can be specified with the
-f argument, for example:
inews -h -f "alhait@eng.sun.com (Amjat Alhait)" < .article
where the .article contains no From: line.
You can pass configuration to inews via environment variables; for
example the NNTPSERVER environment variable tells it where to connect
to. The man page and source code are your friend.
Technical Details
Message-ID:
<6l9s8n$smf@espresso.cafe.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<3577403F.9D082817@eng.sun.com>Show Full Headers
Complete Article Headers
Message-ID: <6l9s8n$smf@espresso.cafe.net> Subject: Re: Really Tough Question Date: Fri, 05 Jun 1998 00:00:00 +0000 From: kaz@cafe.net (Kaz Kylheku) References: <3577403F.9D082817@eng.sun.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 359975339 Sender: bill@espresso.cafe.net Organization: Internet Direct NNTP-Posting-Date: Fri, 05 Jun 1998 15:46:02 PDT Reply-To: kaz@cafe.net Newsgroups: news.software.readers