Automatically determine the smtp server
-
Is there a relatively 'foolproof' way to either determine the smtp server being used by a user of ones program, or alternatively a 'default' setting that one could assign as the smtp host that should work. This is for use in an application that will be utilising system.net.mail for automatic e mailing. I would prefer to avoid having to ask the end user to supply such information during the installation, simply because not all of thenm would know what it is. Most of the searches that I have done around this all seem to include a 'hardcoded' smtp host, which is the one thing I'm trying to avoid. Any suggestions would be greatly appreciated.
-
Is there a relatively 'foolproof' way to either determine the smtp server being used by a user of ones program, or alternatively a 'default' setting that one could assign as the smtp host that should work. This is for use in an application that will be utilising system.net.mail for automatic e mailing. I would prefer to avoid having to ask the end user to supply such information during the installation, simply because not all of thenm would know what it is. Most of the searches that I have done around this all seem to include a 'hardcoded' smtp host, which is the one thing I'm trying to avoid. Any suggestions would be greatly appreciated.
No. The best you can do is to use the settings for a mail server you know of, that you have the right to use.
Member 4427614 wrote:
This is for use in an application that will be utilising system.net.mail for automatic e mailing
Sounds evil.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
No. The best you can do is to use the settings for a mail server you know of, that you have the right to use.
Member 4427614 wrote:
This is for use in an application that will be utilising system.net.mail for automatic e mailing
Sounds evil.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Christian Thanks for your quick reply, I was starting to think the same, so now I guess I'm going to have to turn my attention to doing an NSLookup during the installation routine and seeing if I can get the information I need from there, unless you have a better idea that is. Dom