C
Camelback Jones
Well, thanks to Paul Lalli, I can read - and print, file, etc - USENET
messages okay now.
Now I want to move on to posting USENET messages. And, of course, I'm doing
something stupid again. I think I've got a proper list of lines, and I
think I've got the lines formatted properly - at least, I don't see what's
wrong with the list.
Referring to O'Reilly's Pearl Cookbook, #18.4, i ahve slightly modified
$server->postok() or die "Not allowed to post";
# so we CAN post:
@lines=("From: Norbo Quantitator <aintg\@noemail.com>",
"Date: Fri, Feb 13 2004 15:14:13 CST",
"Newsgroups: alt.test",
"Subject: One More Test",
"Message-ID: <433498\@noemail.com>",
"Path: aintg",
" ",
"This is the body of this message.",
"There may be any number of body lines. Or not.",
" "
);
foreach $line (@lines) { print "$line\n";}
$server->post( [ @lines ] ) or die "Can't post: $!\n";
And it dies. "Can't post: " (no $! content).
Once again, I'm sure I'm doing something stupid, but it seems to me I'm
following the rules, and this code follows some in which we log onto a news
reader and select the "alt.test" newsgroup and read the last message... and
it =does= pass the postok() test... and the message format =looks= okay (as
far as I can tell... I've gone back and forth with and witout blank lines,
with and without newlines, and various versions of the required headers...).
messages okay now.
Now I want to move on to posting USENET messages. And, of course, I'm doing
something stupid again. I think I've got a proper list of lines, and I
think I've got the lines formatted properly - at least, I don't see what's
wrong with the list.
Referring to O'Reilly's Pearl Cookbook, #18.4, i ahve slightly modified
$server->postok() or die "Not allowed to post";
# so we CAN post:
@lines=("From: Norbo Quantitator <aintg\@noemail.com>",
"Date: Fri, Feb 13 2004 15:14:13 CST",
"Newsgroups: alt.test",
"Subject: One More Test",
"Message-ID: <433498\@noemail.com>",
"Path: aintg",
" ",
"This is the body of this message.",
"There may be any number of body lines. Or not.",
" "
);
foreach $line (@lines) { print "$line\n";}
$server->post( [ @lines ] ) or die "Can't post: $!\n";
And it dies. "Can't post: " (no $! content).
Once again, I'm sure I'm doing something stupid, but it seems to me I'm
following the rules, and this code follows some in which we log onto a news
reader and select the "alt.test" newsgroup and read the last message... and
it =does= pass the postok() test... and the message format =looks= okay (as
far as I can tell... I've gone back and forth with and witout blank lines,
with and without newlines, and various versions of the required headers...).