solved.

from

https://www.w3.org/Protocols/rfc977/rfc977.html

3.10. The POST command
...

   The text forming the header and body of the message to be posted
   should be sent by the client using the conventions for text received
   from the news server:  A single period (".") on a line indicates the
   end of the text, with lines starting with a period in the original
   text having that period doubled during transmission.


This code works ok:

var
alist:TStringlist // initialized elsewhere

   alist.Clear;
   aList.Add('POST');
   aList.Add('From: "peppepolpo" <[email protected]>');
   aList.Add('Newsgroups: it.hobby.fai-da-te');
   aList.Add('Subject: test 201937');
   aList.Add('Organization: None');
   aList.Add('X-Newsreader: DIY component ');
   { End of header is a blank line }
   aList.Add('');

   { Write the message body }
   aList.Add('');
   aList.Add('test 201937');
   aList.Add('.');   // <<<<<<<<<<<<<<<<<<<<<<<<<<<  this was missing!
   a:=aclient.SendMessage(alist.Text);



On Wed, Nov 20, 2024 at 8:37 AM Marcus Sackrow via lazarus <
[email protected]> wrote:

> Am 20.11.2024 um 08:34 schrieb Marcus Sackrow via lazarus:
> >>    LineToStream('"peppepolpo" <[email protected]>');
> >>
>
> just noticed here is also the 'From:' missing!
>
> LineToStream('From: "peppepolpo" <[email protected]>');
>
> --
> _______________________________________________
> lazarus mailing list
> [email protected]
> https://lists.lazarus-ide.org/listinfo/lazarus
>
-- 
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to