LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

default email server

does anyone know how to find out a users default email server (not program,
i.e. outlook)? I am using the SMPT vi's and there is a required input for
the server, I would like to make this transparent to the user. thanks.

pat
0 Kudos
Message 1 of 4
(3,028 Views)
Hi Patrick,

You can set a default SMTP server by specifying that in Internet Toolkit Configuration.
To do that in LV go to
LV6:
Tools>>Internet toolkit>>Internet Toolkit Configuration>>SMTP(Email)
LV5:
Project>>Internet toolkit>>Internet Toolkit Configuration>>SMTP(Email)

BTW the settings are saved in "internet.ini" file. so if you wish you could specify that directly there.

A Rafiq
National Instruments
0 Kudos
Message 2 of 4
(3,028 Views)
This doesn't help from the POV of making this all transparent to an end user
though- the user still has to enter this at each site the app is distributed
to.

There's no way in Windows of flawlessly obtaining the mailserver, since each
application has its own settings and, in many cases, can contain multiple
mail servers. However, there is a fortunate lack of imagination in mail
server naming, and the attached example VI tries to identify the local
mailserver and, if successful, returns its name. It requires a working DNS
server on the network and for the local machine to be correctly set up on
the network.

This needs a connector pane defining for it to be useful as more than a
proof of concept. To make he system more robust, you could attempt to send a
mail to an offsite address and make sure you get an "OK" response after
sending the "RCPT" line.

In use, each time your program is run it could try and retrieve the name of
the mailserver from a configuration file. If it can't find the file, it
tries to automatically determine it and writes the information to file for
next time. If it can't autodetermine, then a requestor pops up asking the
user to specify the outbound mailserver, again writing the result to file.
This still potentially needs human interaction, but only in those cases
where the mailserver has an unusual name or DNS is down/not in use, or if
there isn't an email server in the same domain as the machine you're on.

A Rafiq wrote in message
news:101-506500000005000000861A0000-982303670000@quiq.com...
> Hi Patrick,
>
> You can set a default SMTP server by specifying that in Internet
> Toolkit Configuration.
> To do that in LV go to
> LV6:
> Tools>>Internet toolkit>>Internet Toolkit Configuration>>SMTP(Email)
> LV5:
> Project>>Internet toolkit>>Internet Toolkit Configuration>>SMTP(Email)
>
> BTW the settings are saved in "internet.ini" file. so if you wish you
> could specify that directly there.
>
> A Rafiq
> National Instruments



[Attachment Find Mail Server.vi, see below]
0 Kudos
Message 3 of 4
(3,028 Views)
Note; the infinite loop when that VI fails to find a working mailserver is
deliberate, and its correction is left as an exercise for the reader before
using it 😉


Craig Graham wrote in message
news:3a9ea5fd@newsgroups.ni.com...
> This doesn't help from the POV of making this all transparent to an end
user
> though- the user still has to enter this at each site the app is
distributed
> to.
0 Kudos
Message 4 of 4
(3,028 Views)