Solved

I need to Changes Letter OutHouing Server on-fly

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now