Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Components Usage > Re: retrieving ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 167 of 175
Post > Topic >>

Re: retrieving mail

by "Bruce Roberts" <dontsendtober@[EMAIL PROTECTED] > Oct 12, 2005 at 08:18 PM

"Jeff" <ffej2ffej@[EMAIL PROTECTED]
> wrote in message 
news:11kldfchfka89ee@[EMAIL PROTECTED]
>I am trying to make a console program that will retrieve mail from a POP3
> server in Delphi 6.  The program will get all the necessary paramaters 
> (user
> name, password, etc.) in the command line.
>
> This is what I've written so far.
>
> program mailheader;
>
> {$APPTYPE CONSOLE}
>
> uses
>  SysUtils, NMPOP3;
>
> var
> mailretriever : TNMPOP3;
>
> begin
>  { TODO -oUser -cConsole Main : Insert code here }

> I'm wondering about several subjects:
> Is this the proper way to include a TNMPOP3 component in a non-form
> application?
> Should I be calling the TNMPOP3 constructor?  (aka the Create method)?

Yes.

I'm not familiar with the tNMPop3 type. However, if it is a component then

you need to create an instance before actually using it. Simply declaring 
storage to reference the instance is not enough. You probably need 
something like

        mailRetriever := tNMPop3.Create ( {perhaps some parameters} );

> If I do call the Create method, what should I put as the owner?  I'm 
> trying
> to tell it to be owned by the program, but if I say
> mailretriever.Create(mailheader) it has no idea what I mean.

Ah. Owner is generally the form on which you've dropped the control at 
design time. You might try Nil for Owner. (You'll have to remember to use 
Free to release the control.)
 




 4 Posts in Topic:
retrieving mail
"Jeff" <ffej  2005-10-10 11:41:25 
Re: retrieving mail
Jamie <jamie_5_not_val  2005-10-10 21:11:34 
Re: retrieving mail
"Bruce Roberts"  2005-10-12 20:18:31 
Re: retrieving mail
Fumio Kawamata <fumio@  2005-10-13 22:56:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 10:19:04 CDT 2008.