Take a look at this link and look for a function called GetIP()
http://fox.wikis.com/wc.dll?Wiki~SendSmtpEmail>Team:
>
>Can anyone tell me how to automatically retrieve the SMTP server address from a computer. I am trying to automate an email function and I don't want users to have to know the SMTP address.
>
>The mail program I am using has this comment regarding the SMTP:
>
>* strServ: The SMTP server to use. Can be in the following formats:
>* xxx.xxx.xxx.xxx "xxx.xxx.xxx.xxx:port" "xxx.xxx.xxx.xxx port"
>* ServerName "servername:port" "servername port"
>
>Thanks in advance,
>Jim Gray.