Change SMTP server by script

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use my laptop at home, where my ISP blocks use of all SMTP servers except
theirs and remotely, where my ISP will not allow me to use theirs, so I use
the SMTP server of my domain hosting service with the POP-first method.

I am getting tired of having to manually change the outgoing mail server in
Outlook twice a day. Is there a way to create a batch or reg file or a script
to change this (i.e. where is it stored)?
 
Yes, there's a way. You can use a tool like Netswitcher or your own custom
script that changes values in your MAPI profile which is stored here under
this registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles

Under that key will be keys named for each of your profiles. Under those
you'll find a key with this name: 9375CFF0413111d3B88A00104B2A6676

Under that key you'll find values for each account. Under one of those keys
you'll find values for your servers including SMTP Server. The biggest trick
is that the values are saved as Unicode, not straight ASCII.
 
No wonder I couldn't find it by searching the registry.

So, I just set it manually & exported the key for the account once each way
so that I have two .reg files. No script necessary - just run the .reg file
before opening Outlook.

Thanks.
 

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