Board index » delphi » Sending email from Delphi on intranets?

Sending email from Delphi on intranets?

I have not yet used any email components in my software but I have
this question before I start:
Is it possible to send an email message from my Delphi4 app when it is
running on an internal LAN system? There will be no possibility to
access the Internet so the app must use whatever is available on the
internal network.

AFAIK the only email server on the network will be MS Exchange Server
and I don't know if the email component in D4 can handle that.
Do you need to have Outlook running and be a regular user on the
network in order to send email through Exchange?

What I am doing is industrial control software and the idea has popped
up to send error alerts from our software through email. But as said,
I don't know if Exchange is possible to use with Delphi.

Any clues?

Bo Berglund
Software developer in Sweden
bo.bergl...@telia.com

PGP: My public key is available at the following locations:
Idap://certserver.pgp.com
http://pgpkeys.mit.edu:11371

 

Re:Sending email from Delphi on intranets?


Of course its possible.  Microsoft has their fingers into everything
nowadays.  Look up OLE Automation in your Outlook and Delphi help files.
That's the topic you want to read about.  You'll need to import the Outlook
type library from your system folder.

HTH,

JJ

Quote
Bo Berglund <bo.bergl...@telia.com> wrote in message

news:3868a987.162257093@nntpserver.swip.net...
Quote
> I have not yet used any email components in my software but I have
> this question before I start:
> Is it possible to send an email message from my Delphi4 app when it is
> running on an internal LAN system? There will be no possibility to
> access the Internet so the app must use whatever is available on the
> internal network.

> AFAIK the only email server on the network will be MS Exchange Server
> and I don't know if the email component in D4 can handle that.
> Do you need to have Outlook running and be a regular user on the
> network in order to send email through Exchange?

> What I am doing is industrial control software and the idea has popped
> up to send error alerts from our software through email. But as said,
> I don't know if Exchange is possible to use with Delphi.

> Any clues?

> Bo Berglund
> Software developer in Sweden
> bo.bergl...@telia.com

> PGP: My public key is available at the following locations:
> Idap://certserver.pgp.com
> http://pgpkeys.mit.edu:11371

Re:Sending email from Delphi on intranets?


SOLVED!
This was real simple when I could get onto a LAN with an Exchange
server running!
I put an NMSMTP control on my form, then I made some entry boxes for
things like addresses, message, subject, hostname etc.

On the click of a button I filled the properties of the component with
data from these and then:
        NMSMTP1.Connect;
        NMSMTP1.SendMail;
        NMSMTP1.Disconnect;

After this I checked the mailboxes and sure, all of it was delivered!

No need for any OLE stuff or Outlook connect or anything else.
Everything I needed was in the Delphi4 Pro package from Borland!

Bo Berglund
Software developer in Sweden
bo.bergl...@telia.com

PGP: My public key is available at the following locations:
Idap://certserver.pgp.com
http://pgpkeys.mit.edu:11371

Re:Sending email from Delphi on intranets?


oh, I didn't know the program was running on the server. my bad.

Quote
Bo Berglund <bo.bergl...@telia.com> wrote in message

news:38693458.197794954@nntpserver.swip.net...
Quote
> SOLVED!
> This was real simple when I could get onto a LAN with an Exchange
> server running!
> I put an NMSMTP control on my form, then I made some entry boxes for
> things like addresses, message, subject, hostname etc.

> On the click of a button I filled the properties of the component with
> data from these and then:
> NMSMTP1.Connect;
> NMSMTP1.SendMail;
> NMSMTP1.Disconnect;

> After this I checked the mailboxes and sure, all of it was delivered!

> No need for any OLE stuff or Outlook connect or anything else.
> Everything I needed was in the Delphi4 Pro package from Borland!

> Bo Berglund
> Software developer in Sweden
> bo.bergl...@telia.com

> PGP: My public key is available at the following locations:
> Idap://certserver.pgp.com
> http://pgpkeys.mit.edu:11371

Re:Sending email from Delphi on intranets?


Nope,
the client software is running on a workstation. I tested by
connecting to the target LAN through RAS dialup and then I just used
the NMSMTP component by setting the host property to the IP of the
server on the LAN which is running Exchange Server. The component
apparently then uses TCP/IP to connect to the server and send the
email.
Worked Ok after a few tries on formatting the addresses since i wanted
to use the friendly type address RealName <mail@server> and I got it
wrong a couple of times.

Bo

Quote
On Wed, 29 Dec 1999 09:19:57 -0500, "JJ" <g...@dfg.com> wrote:
>oh, I didn't know the program was running on the server. my bad.

>Bo Berglund <bo.bergl...@telia.com> wrote in message
>news:38693458.197794954@nntpserver.swip.net...
>> SOLVED!
>> This was real simple when I could get onto a LAN with an Exchange
>> server running!
>> I put an NMSMTP control on my form, then I made some entry boxes for
>> things like addresses, message, subject, hostname etc.

>> On the click of a button I filled the properties of the component with
>> data from these and then:
>> NMSMTP1.Connect;
>> NMSMTP1.SendMail;
>> NMSMTP1.Disconnect;

>> After this I checked the mailboxes and sure, all of it was delivered!

>> No need for any OLE stuff or Outlook connect or anything else.
>> Everything I needed was in the Delphi4 Pro package from Borland!

>> Bo Berglund
>> Software developer in Sweden
>> bo.bergl...@telia.com

>> PGP: My public key is available at the following locations:
>> Idap://certserver.pgp.com
>> http://pgpkeys.mit.edu:11371

Bo Berglund
Software developer in Sweden
bo.bergl...@telia.com

PGP: My public key is available at the following locations:
Idap://certserver.pgp.com
http://pgpkeys.mit.edu:11371

Other Threads