Changing SMTP Servers

Tip 104: Changing SMTP Servers

Do you need to use different SMTP servers depending on how you connect to the Internet?

Rather than constantly editing the account properties, create a new account using the other 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 and you do need to remember to switch accounts if you reply to mail downloaded through an account using the other SMTP.

Alternately, make a copy of your profile, so you have one profile for SMTP 1 and one for SMTP 2. Both profiles will be identical except for the SMTP servers used, right down to the account names and pst's used. Switch profiles when you switch Internet connections.

Published Mar 4 2004

Tip 111: More SMTP Servers

Last week I told you how to configure Outlook to use different SMTP servers with each account. Andrew Helsby has another method – he uses “mail” as the SMTP in all accounts and a hosts file to change the IP used by “mail”.

Andrew uses a batch file to swap out his hosts.home and files, but if you aren’t into writing batch files, you can just as easily create a shortcut to Hosts to open it in Notepad and comment out one IP and uncomment the other.

Create a shortcut on your desktop or Quick Launch toolbar. The command line will look like this:
notepad c:\windows\system32\drivers\etc\hosts

Enter two lines in your hosts file like this, using the correct SMTP IP for your server:

# mail # Use this SMTP at Work mail # Use this SMTP from Home

When you switch connections, click the shortcut and add a leading pound sign (#) to stop using a server and remove the pound sign to begin using the other SMTP server. Save and close the file.

To find out the IP of your SMTP dedicated server, at Start menu, Run type:
cmd /k ping

For Windows 9x/ME, type
Command /k ping

(Replace with the proper name of your mail server.)

If Outlook is slow to accept the new IP, at Start menu, Run type:
ipconfig /flushdns

Published March 22 2004

  • mojammel

    i have 1 mail account but i use 2 internet connection and both are wireless
    1 is my office and other is my home . when i use my office internet i have to change my outgoing SMTP servers to and when i am use my home internet i have to change my outgoing SMTP servers to . is it possible to use both outgoing SMTP servers and when i am in home it will change or use the outgoing SMTP servers auto and when i am in office it will do the same. is it possible ?

  • Diane Poremsky

    Its not possible to change it automatically. You have two options: 2 profiles, one for home and one for work or use a batch file to switch the smtp (could also use a reg file, but this would require restarting outlook). A third option when the reason for switching servers is because your internet provider makes you use their smtp, is to use an alternate smtp port. In most cases, only port 25 is blocked - but your mail server needs to support a different port.