Solved

I need to Changes Letter OutHouing Server on-fly

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wincontrol not (correctly) drawn 15 49
Delphi problems to abort a printjob 9 35
shape, triangle, dbctrlgrid 3 33
Firemonkey Queue list 1 32
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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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