Get SMTP Server Information

  • Thread starter Thread starter rdemyan via AccessMonster.com
  • Start date Start date
R

rdemyan via AccessMonster.com

Is there a way to get the SMTP Server Information for a PC's default mail
system. I'm thinking about using CDO, but apparantly the SMTP Server has to
be specified. Every bit of code I've seen has this hard coded.
Thanks.
 
The only way I know is to set up any server and enable the smtp service. Run
IPConfig (Start ... Run then type: ipconfig.exe) to get the server's IP
address. Hardcode that into your code as in:

Dim smtpServer As String
Dim fromAddr As String
Dim Recipients As String
Dim replyTo As String
Dim strProcessPath As String

Dim cdoMessage As Object
Dim cdoConfig As Object

strProcessPath = "F:\Mail\Process.txt"


smtpServer = "192.168.201.2"
fromAddr = "(e-mail address removed)"
Recipients = strEmail
replyTo = "(e-mail address removed)"

--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 
Thanks, Arvin; but, how do I know who is going to use my software and what
their smtp info might be. It looks like I'll have to ask the user to enter
it in a textbox so that the code can use it; unless someone has another idea.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top