Board index » delphi » Using VCL/NMSMTP component in console application

Using VCL/NMSMTP component in console application

I am writing a console app to perform CGI functions. I wanted to use the
NMSMTP component to mail the form attribute/value pairs to a recipient, much
the way the FormMail perl script does.

However, NMSMTP's constructor requires a TComponent as the NMSMTP
component's owner. There doesn't appear to be a way to do this, and
constructing it with *nil* gives an access violation.

Is this possible, and if so how?

I can set up a separate Windows program/service to act as an "SMTP server",
or start a separate program to send each message, but this seems pretty
clunky.

Anyone have any bright ideas?

TIA, will be much appreciated

Andrew Nerlich

 

Re:Using VCL/NMSMTP component in console application


I have done this before with the Andreas H?rstemeier's TCP/IP component
suite SMTP component. I had to mosify the source to be able to create it with
nil as the owner but I did get it working. I'll see if I can drag that up and
send it to
you off-group.

Eddie Shipman

Quote
Andrew Nerlich wrote:
> I am writing a console app to perform CGI functions. I wanted to use the
> NMSMTP component to mail the form attribute/value pairs to a recipient, much
> the way the FormMail perl script does.

> However, NMSMTP's constructor requires a TComponent as the NMSMTP
> component's owner. There doesn't appear to be a way to do this, and
> constructing it with *nil* gives an access violation.

> Is this possible, and if so how?

> I can set up a separate Windows program/service to act as an "SMTP server",
> or start a separate program to send each message, but this seems pretty
> clunky.

> Anyone have any bright ideas?

> TIA, will be much appreciated

> Andrew Nerlich

--
Eddie Shipman
ship...@inetport.com

NOTICE TO BULK E-MAILERS: Pursuant to US Code, Title 47, Chapter
5,Subchapter II, p.227, any and all nonsolicited commercial E-mail sent to
this address is subject to a download and archival fee in the amount of
$500 US.  E-mailing denotes acceptance of these terms.

Re:Using VCL/NMSMTP component in console application


Try Winshoes. It will work fine for wha you need, and has free support, and
is constantly being upgraded and improved.

--
Chad Z. Hower - Church Hill, TN
http://www.pbe.com/Kudzu/ - Free Delphi and other stuff - Free articles now
also online
http://www.pbe.com/Winshoes/ - Free internet components w source

Quote
Andrew Nerlich <a...@sosos.com.au> wrote in message

news:7ek737$32t20@forums.borland.com...
: I am writing a console app to perform CGI functions. I wanted to use the
: NMSMTP component to mail the form attribute/value pairs to a recipient,
much
: the way the FormMail perl script does.
:
: However, NMSMTP's constructor requires a TComponent as the NMSMTP
: component's owner. There doesn't appear to be a way to do this, and
: constructing it with *nil* gives an access violation.
:
: Is this possible, and if so how?
:
: I can set up a separate Windows program/service to act as an "SMTP
server",
: or start a separate program to send each message, but this seems pretty
: clunky.
:
: Anyone have any bright ideas?
:
: TIA, will be much appreciated
:
: Andrew Nerlich
:
:

Re:Using VCL/NMSMTP component in console application


Chad,

Thanks, I'll check it out.

Andrew

Quote
Chad Z. Hower wrote in message <7emerr$5f...@forums.borland.com>...
>Try Winshoes. It will work fine for wha you need, and has free support, and
>is constantly being upgraded and improved.

>--
>Chad Z. Hower - Church Hill, TN
>http://www.pbe.com/Kudzu/ - Free Delphi and other stuff - Free articles now
>also online
>http://www.pbe.com/Winshoes/ - Free internet components w source

Other Threads