By Diane Poremsky
Many ISPs require that users route all outbound mail through their mail servers (that is, the ISP's servers, rather than, say, your company's own mail server). If you happen to use several different ISPs, you'll to change the SMTP (Simple Mail Transport Protocol) account each time you change how you connect to the Internet.
Editing the account properties dialog each time gets old fast, especially if you switch connection methods often. This annoyance is particularly prevalent among users who carry their laptops from location to location.
A common workaround is to create a new account using another SMTP server. While this works well for two SMTP servers, giving you Account A - SMTP 1, Account B - SMTP 1, Account A - SMTP 2, Account B - SMTP 2, it can get unmanageable if you have too many accounts since you need to remember to switch accounts if you reply to mail downloaded through an account using the other SMTP server.
Another alternative is to make a copy of your Outlook profile, so you have one profile for SMTP 1 and another profile for SMTP 2. Both profiles will be identical except for the SMTP servers used, right down to the account names and PST files used. When you switch Internet connections, close Outlook and reopen Outlook using the correct profile.
Andy Helsby recommends a method which needs only one profile. Use a server called "mail" as your SMTP server in all accounts and edit the hosts file in the windows\system32\drivers\etc directory with the correct IP address.
Enter the IP addresses for each SMTP server and comment out the SMTP servers you aren't using with the current connection. To switch SMTP servers, open the Hosts file using the shortcut and comment out the old SMTP server and uncomment the SMTP server you want to use. As an example, your entries will look like this when you are using the SMTP server you normally connect to when you send mail from home:
66.55.44.33 mail # Use this SMTP from Home
To make editing the Hosts file easier, add a shortcut to the hosts file to your Quick Launch bar to open the hosts files in Notepad, using this command line:
If you are into writing batch files or scripts, create two batch files and two hosts files. Home.bat copies the hosts.home file to hosts, while Work.bat copies hosts.work to the hosts file when you run it. Since the SMTP server name doesn't change, you can run either batch file when Outlook is open.