Just uploaded FREEWARE NNTP, SMTP and POP3 component to Super Page 
Author Message
 Just uploaded FREEWARE NNTP, SMTP and POP3 component to Super Page

But just where/what is the Super Page?  A Ted Turner Web Site?

Daniel J. Wojcik
As he walked away from the bicycle accident,
he had a handlebar stuck on his face.  A passer-by remarked
"Oh, that must ache!"

                                   ~~  ~~

Sun, 26 Jul 1998 03:00:00 GMT  
 Just uploaded FREEWARE NNTP, SMTP and POP3 component to Super Page
        Install swinsock.dcu into your component pallete.

        I will try to improve this and include examples as time permits.

        All methods are of the blocking style. They do NOT use blocking
calls (Except connect).  They are implemented this way for ease of
implementation, and because we had existing projects which needed porting
and this extremely facilitated such.


TPBE_Winsock This is a base class used for the other components.
   procedure DoStatus(const sMsg: string);
           Calls the OnStatus Event to report messages back to application
   procedure SRaise(EException: TClassException);
   procedure raise_serror(const iErr: integer);
   function sErr(const iResult, iIgnore: integer): boolean;
   Function SockErrMsg(const iErr: integer): String;
        CommandResult: string;
   ResultNo: SmallInt;
   property LocalName: String; Read Only
           Returns the IP of the local machine
   constructor Create(AOwner: TComponent)
   destructor Destroy;
   procedure Capture(strm: TStream; const sDelim: string);
   function Command(const sOut: String; const nResponse: SmallInt;
                                        const nLevel: byte; const sMsg:
String): SmallInt;
        procedure Connect
   procedure Disconnect
   function ReadLnCheck(var i1: integer): string;
   function ReadLn: string;
   function ReadLnWait: string;
        function ResolveHost(sHost: string): longint;
        procedure WaitWriteable;
   procedure Write(sOut: string);
        function Writeable: boolean;
   procedure WriteLn(sOut: string);
                Writes a line to the socket.
   procedure WriteMessage(strm: TStream);
                Writes a text message to a socket. Lines are terminated by
a               EOL (CR/LF).  Text will be wordwrapped to 80 characters on
        procedure WriteStream(strm: TStream);
                Writes a stream to the socket.

        Property Host: string read FsHost write FsHost;
                Contains the domain name of the host to connect to.
        Property LogFile: string read FnLogFile write FnLogFile;
                Contains a fully qualified pathname to which a command log
will            be written.
   property OnStatus: TStatusEvent
                Occurs at various times with progress messages
        property Port
                Port number to use.
   property Version
                Returns Version of Component

TPBE_sNNTP = class(TPBE_Winsock)
                Currently this only retrieves messages. It will contain
posting                 ability within the next week.
        MsgHi, MsgLo, MsgCount: longint;
                These will be updated upon each call to SelectGroup. They
will            contain the high message no, low message no, and no of
actual          messages.
   PostingNewsgroups: TStringList;
                Future Expansion
   property NoHeader: boolean
                If true, no header will be retrieved with GetMessage.
        constructor Create(AOwner: TComponent);
   destructor Destroy;
        procedure Connect;
                Connects to host specified in Host using Port. Returns
when done.
        procedure Disconnect;
                Disconects from host gracefully.
   procedure GetMessage(const lMsgNo: longint; strmH, strmT: TStream);
                Retrieves message number lMsgNo from the currnetly
selecteed               group.  The header will be streamed to strmH and
the body of the                 message will be streamed to strmT.
   procedure Post;
                Future Expansion
   procedure SelectGroup(const sGroup: string);
                Selects newsgroup specified in sGroup.

        1) Set Host
        2) Call Connect
        3) Use SelectGroup
        4) Retrieve Messages using GetMessage
        5) Go to step 3, or Disconnect

TPBE_sSMTP = class(TPBE_Winsock)
        DistList: TStringList;
                Contains a list of Email addreses.  The sTo parameter of
Send            specifies a descriptive name for this list.
        constructor Create(AOwner: TComponent)
   destructor Destroy
        procedure Connect
        procedure Disconnect
   procedure Send(const sTo: string; sSubj: String; strm: TStream)
                Sends a message.
                sTo: Contains the email address of a single recipient.  
For                     multiple recipients, use DistList.
                sSubj: Contains the subject of the message.
                strm: Text of message to be sent will be streamed from
        property DefaultDomain: String
                If any email addresses are specified which do not have a
domain,                 this will be used.
        property From: String
                Contains the address of the sender
        property ExtraHeader: TStringList
                Contains a list of extra lines you would like to add to
the header              of the message.
        property XMailer: String
                Contains an optional name to be put in the X-Mailer line.
This            line contains the name of the software use to post the

TPBE_sPOP3 = class(TPBE_Winsock)
        constructor Create(AOwner: TComponent)
   destructor Destroy
        procedure Connect
                Connects to the POP server specified in Host using Port,
UserID,                 and Password.
        procedure Disconnect
   function Retrieve(const nMsgNo: SmallInt; strmH, strmT: TStream):    
                Retrieves a message from the server.  Will return true if
message                 number does not exist.  General usage is to start
at 1, and               increment until this function returns true.
                nMsgNo: Message number to retrieve
                strmH: Stream to write header to.
                strmT: Stream to write body of message to.
        property Delete: Boolean
                If true, messages will be deleted from the POP server
after           a successful Retrieve.
        property Password: String
                Contains the password for user in UserID.
        property UserID: String
                Contains the user ID used to login.

        1) Connect
        2) Retrieve message #n
        3) If step 2 returned false, increment n and repeat step 2.
        4) Disconnect

Sun, 26 Jul 1998 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. SMTP and NNTP source????

2. Sending and receiving email (SMTP & POP3)

3. Help using NNTP Activex components

4. Delphi Super Page

5. Opus Direct @ Super Page Corrupt!!!

6. Reminder/info: WWW/FTP Delphi Super Page

7. Web sites for freeware, shareware delphi components/utilities

8. component and/or freeware REPORT GENERATORS with source.

9. Freeware components library

10. Freeware components library


12. Freeware-Components


Powered by phpBB® Forum Software