Article View: news.software.nntp
Article #59844Re: simple post syntax problem
From: simon taylor
Date: Mon, 05 Aug 2002 13:24
Date: Mon, 05 Aug 2002 13:24
55 lines
2568 bytes
2568 bytes
Erik/Greg
Thanks for your replies - they where both spot on :)
For anyone else who is interested heres a code snippet that does the business:
Winsock1.SendData "POST " & vbCrLf
'Wait for reply from server
Winsock1.SendData "Newsgroups: " & NameOfNewsGroup & vbCrLf
Winsock1.SendData "Subject: " & TheSubject & vbCrLf
Winsock1.SendData "From: " & ThePersonWhoIsSending & vbCrLf
Winsock1.SendData vbCrLf
Winsock1.SendData TheBodyOfTheMessage & vbCrLf
Winsock1.SendData "." & vbCrLf
'You should get a confirmation notice from the server at this point !
& is a string concaternation :)
cheers
simon.
gerg@panix.com (Greg Andrews) wrote in message news:<aif5js$qab$1@reader2.panix.com>...
> simon.taylor@fdlearning.com (simon taylor) writes:
> >
> >Winsock1.SendData "POST"
> >
>
> Aren't you supposed to send the POST command, followed by
> a CR and LF, then read the server's reply before you
> start sending the article?
>
> >winsock1.sendData "Newsgroup: test "
> >Winsock1.SendData "From: me@company.com "
> >Winsock1.SendData "Subject:NNTP Demo Post "
> >winsock1.senddata " "
> >Winsock1.SendData "This is an NNTP posting demonstration"
> >Winsock1.SendData "." & vbCrLf
>
> Does this indicate that the line "Newsgroup: test " did not
> and in a CR and LF? That the only CR and LF appeared at the
> end of the "." line?
>
> If I understand the above correctly, then you're sending your
> entire article as a single line rather than multiple lines.
> That would be a problem. Articles are transmitted as multiple
> lines rather than just one.
>
> -Greg
Technical Details
Message-ID:
<6ffb6d34.0208050524.17c081ba@posting.google.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!postnews1.google.com!not-for-mailReferences:
<6ffb6d34.0208020258.61f087f0@posting.google.com> <aif5js$qab$1@reader2.panix.com>Show Full Headers
Complete Article Headers
Message-ID: <6ffb6d34.0208050524.17c081ba@posting.google.com> Subject: Re: simple post syntax problem Date: Mon, 05 Aug 2002 13:24:08 +0000 From: simon.taylor@fdlearning.com (simon taylor) References: <6ffb6d34.0208020258.61f087f0@posting.google.com> <aif5js$qab$1@reader2.panix.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!postnews1.google.com!not-for-mail Newsgroups: news.software.nntp Organization: http://groups.google.com/ Lines: 54 NNTP-Posting-Host: 195.62.203.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1028553848 21381 127.0.0.1 (5 Aug 2002 13:24:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 5 Aug 2002 13:24:08 GMT