Subj : Re: SMTP and POP3 To : Chris Hoppman From : Jasen Betts Date : Sat Nov 23 2002 09:58 pm Hi Chris. 15-Nov-02 11:04:17, Chris Hoppman wrote to Jasen Betts CH> * Copied from: PASCAL_LESSONS CH> |15Quoting Message From |10Jasen Betts |15to |10Chris Hoppman CH> |15On |1009 Nov 02 06:43:43. JB>> if you want details try a unix manual entry get a book (google should JB>> find you a few). or get a book. CH> Looking into it. My libary doesn't have a unix manual on hand, but think oops. it looks like i miss typed, unix manuals are mainly electronic documents and are often readable over the web, and downloadable, free. As a book you should look for a book you want a book on email transfer... CH> PROCEDURE TSMTPServer.cmdData(VAR Message: TaslMessage); CH> BEGIN CH> IF FSender='' THEN CH> CliSocket.WriteLn('503 Must send MAIL FROM: first') CH> ELSE CH> IF FRecipients.Count=0 THEN CH> CliSocket.WriteLn('503 Must send RCPT TO: first') CH> ELSE CH> BEGIN CH> CliSocket.WriteLn('354 Send mail; end with .'); CH> GetMsgLines(FMessage); -->> IF StoreMessage(FSender, FRecipients, FMessage) THEN CH> BEGIN CH> CliSocket.WriteLn('250 OK'); I expect that storemessage does the actual writing of the message to the message file. CH> (* Should I do the text write here? CH> Also, FSender is in TString form. Can use you that CH> almost like a accual string to write to a text or CH> fsender[1],fsender[2],etc. *) Tstring? (like pstring? - nul terminated) dunno for sure but it should be easy to test it. -->> This is where it stores the message. I think. CH> (** StoreMessage **) CH> FUNCTION StoreMessage(ASender: String; ARecipiants, AMessage: CH> TStringList): CH> Boolean; VIRTUAL; ABSTRACT; CH> I look'd around all the units and this is the only thing I found. CH> It was never defined in the IMPLANTION part of the unit. I see CH> that it is a boolean type, but does virtual and abstract effect it? virtual and abstract are OO thioings that I don't fully understand. code is code... edit the code :) CH> I know I sound lame, but I am a newbie at oop. CH> TStringList is a link list of string, but how do you write it to a file. One string at a time with CR/LF etc between them. CH> ah ha.. maybe CH> Procedure WriteStoreMessage(ASender: String; ARecipiants, AMessage: CH> TstringList); CH> type CH> Message = Record CH> Sender : String; CH> Recipiants : ????; CH> Message : ????; ???? - I've never seen that beast before. CH> end; CH> var email:Message; CH> emaildat: file of email; CH> begin CH> email.sender:=Asender; CH> email.Recipiants:=ARecipiants; CH> email.Message:=AMessage; CH> assign(emaildat,'email.dat'); CH> rewrite(email); CH> seek(email,0); CH> write(emaildat,email); CH> close(emaildat); CH> end. yeah,I guess that'd work... not sure exatly what format that'd give though. -=> Bye <=- --- * Origin: Positive: Mistaken at the top of one's voice. (3:640/531.42) .