Get SMTP Server from Outlook

G

Greg Lovern

I have an Excel VBA macro that sends mail using CDO. Works fine, but
users have to enter their SMTP Server in a designated cell.

Most of the users are using Outlook. Can I get the SMTP Server name
from Outlook by automating Outlook?


Thanks,

Greg
 
M

Michael Bauer [MVP - Outlook]

It's in the registry. For Outlook 2003 e.g. it's:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles\[Profile]\9375CFF0413111d3B88A00104B2A6676\

In the subkeys you have to search for the specific account name and read the
SMTP Server property.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Sun, 10 Jun 2007 09:20:39 -0700 schrieb Greg Lovern:
 
D

Dmitry Streblechenko

<plug>
Or you can do that using Redemption: RDOPOP3Account.SMTP_Server -
http://www.dimastr.com/redemption/rdo/RDOAccount.htm#RDOPOP3Account
</plug>

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Michael Bauer said:
It's in the registry. For Outlook 2003 e.g. it's:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles\[Profile]\9375CFF0413111d3B88A00104B2A6676\

In the subkeys you have to search for the specific account name and read
the
SMTP Server property.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:

<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Sun, 10 Jun 2007 09:20:39 -0700 schrieb Greg Lovern:
I have an Excel VBA macro that sends mail using CDO. Works fine, but
users have to enter their SMTP Server in a designated cell.

Most of the users are using Outlook. Can I get the SMTP Server name
from Outlook by automating Outlook?


Thanks,

Greg
 

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

Top