Re: Problem in developing newsreader in vb.net

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Peter Jausovec (peter_at_jausovec.net)
Date: 11/17/04


Date: Wed, 17 Nov 2004 14:53:21 +0100

Hi,

Here is the code (by Randy Charles Morin) (C#) for posting to newsgroup:

public void Post(string newsgroup, string subject, string from, string
content)
{
       string message;
       string response;

       message = "POST " + newsgroup + "\r\n";

       Write(message);
       response = Response();

       if (response.Substring( 0, 3) != "340")
              throw new NntpException(response);

       message = "From: " + from + "\r\n"

              + "Newsgroups: " + newsgroup + "\r\n"

              + "Subject: " + subject + "\r\n\r\n"

              + content + "\r\n.\r\n";

       Write(message);

       response = Response();

       if (response.Substring( 0, 3) != "240")
              throw new NntpException(response);
}

Regards,
Peter Jausovec
(http://blog.jausovec.net)

".net" <baluveer_mukkamala@yahoo.com> wrote in message
news:u4p2atKzEHA.1292@TK2MSFTNGP10.phx.gbl...
> Hello,
>
> I am developing a Newsreader in vb.net and i am
>
> getting a problem in posting article to newserver
>
> for a particular set of newsgroups. i developin g
>
> this newsreader using nntp commands.I need
>
> vb.net code for posting a article . I getting a
>
> problem in defining a article format.
>
> Kindly , Send me code for posting article in vb.net
>
> using nntp command "post".
>
> with regards,
> balu.
>
>
>



Relevant Pages

  • Re: Problem in developing newsreader in vb.net
    ... Here is the code for posting to newsgroup: ... public void Post(string newsgroup, string subject, string from, string ... Send me code for posting article in vb.net ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Force Reboot
    ... how do you search the archives? ... I know about is on the newsgroup page and that does not give the result you ... String, ByVal lnOutBufferSize As Long, ByVal lpBytesReturned As Long) As ... I see this posting in many places but it does not seem to work, ...
    (microsoft.public.windowsce.embedded.vb)
  • Re: Help on Regular Expression
    ... > I didn't know which newsgroup to post, so I'm posting here hoping to get ... > MyObject.ExecuteWhatever(parama, paramB, paramC...) ... > So I want to get the string from .Execute... ...
    (microsoft.public.dotnet.languages.csharp)
  • Help on Regular Expression
    ... I didn't know which newsgroup to post, so I'm posting here hoping to get ... a help on Regular Expression. ... So I want to get the string from .Execute... ...
    (microsoft.public.dotnet.languages.csharp)
  • Mah-Jongg FAQs updated
    ... FAQ 7f - Added a site that makes an American mah-jongg table expander. ... Introduction to Mah-Jongg Newsgroup ... FAQ11b Origins: Precursor Games ... NEWSGROUP POSTING ARCHIVES: ...
    (rec.games.mahjong)