Solved

I need to Changes Letter OutHouing Server on-fly

Posted on 2002-03-30
3
138 Views
Last Modified: 2010-04-04
Problem synopsis:
I am using several internet providers to get into Internet (there are several Internet Connections on my PC)
Each internet provider has his own SMTP server (outgouing server). If i decide to change the Internet connection - i begin using an Internet Connection that differs from my default Internet Connection - then i start having problems with sending letters because new Internet Connection has different SMTP server.
Of cause I can change SMTP server for all mail accounts in my Outlook but it is not useful if i change Internet Connection often or If I use other mail client program (the Bat)

Problem solution:
1. Manually change SMTP server for all accounts in my Mail Client Program(OutLook,  The Bat, ect) everytime when i change Internat Connection. (VERY INCONVENIENT and I don't want to do it)
2. Change SMTP for each letter that is going to be send on the System level. (I don't know how :( ).

I would like to make a program that will determine what Internet Connection is active and depending on this connection will change the mail OUTGOUING server on fly.
0
Comment
Question by:penich
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
AvonWyss earned 300 total points
ID: 6908545
There are free RAS/DialUp components available for Delphi which will allow you to monitor the state of your connections. Now, whenever a connection is made, I'd replace the HOSTS file with one customized fr your needs. The HOSTS file is a text file which is used when Windows tries to resolve host names before it queries a DNS server. Therefore, if you define a a name there (for instance, "SMTP") and set its IP depending on the provider SMTP server, you'll not have to change the configuration of any email application.

Windows 95/98/ME:
The HOSTS file (NO extension!) is to be found in the WINDOWS directory. The file may not yet exist, but there will at least be a HOSTS.SAM (SAMple) file which you can use as template.

Windows NT/2000/XP:
The HOSTS file is to be found in the (windows)\SYSTEM32\DRIVERS\ETC directory.

RAS components:
http://www.torry.net/ras.htm
0
 

Author Comment

by:penich
ID: 6935928
Thanks a lot AvonWyss!!!
I tested what you told me and figured out that it works
I appritiate it and already use this program
If you are interesting in it - here is the program i wrote
http://penich.tomsk.ru/SMTPSwitch.exe
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 6936945
penich, glad that I was able to help! Since I have a cable connection here, I don't need to switch ISPs, but I appreciate you posting the link here. Have a nice weekend!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question