Solved

I need to Changes Letter OutHouing Server on-fly

Posted on 2002-03-30
3
135 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 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