How to identify the name of my smtp-mail host dynamically?
843830Nov 5 2003 — edited Nov 11 2003
Hi,
I want to send an email from my system which has an internet connection.
I don't know how to identify and mention the name of my smtp server ie; the smtp-host name that should be mentioned in my propetries object 'props' as props("mail.smtp.host","smtphostname");
I want this program to work on other systems also,ie; It should dynamically find out what is the smtp-email host for the computer on which the program is running and set the smtp-host name in the 'properties' object dynamically.
I will be thankful if anybody sends me code to solve this problem.
Thank u in advance,
Ravi.