Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

console app vs application using TNMPOP3

Status
Not open for further replies.

ffej2ffej

Programmer
Oct 8, 2005
9
US
I'm working on a project that is supposed to be a console application. Since it uses a TNMPOP3 component, someone (newsgroup) told me that it's impossible to make it a console application. Instead, I made an application that has no user visible controls and does its job on the 1st tick of a timer which I put on the form. My boss says this is still not acceptable and wants a console application. Is this possible? If it is possible, how specifically do I instantiate the TNMPOP3 component? Where do I put the code to perform this instantiation?
 
it's not a VCL component, so there's no issue. to use:

Code:
uses
  <appropriate unit>;

procedure CheckMail;
var
  p : TNMPOP3;
begin
  p := TNMPOP3.Create;
  try
    p.Host := ....   // assign properties like this
    // do other things with p
  finally
    p.Free;
  end;
end;
 
Tried That. TNMPOP3.create requires an owner. I don't rememeber the syntax, but the Delphi non-help says TNMOPOP3.create(TObject: Owner) or something like that. Whatever it was, I tried repeatedly with no success.
 
...or you can use a TDatamodule and put your component on it...

[flowerface]

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
success! The line that did it is listed below.
Code:
myConnector := TNMPOP3.Create(nil);

I also had to include NMpop3 under the uses heading

Thanks squared to all who posted answers including (but not limited to) Griffyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top