Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2003
Added on Nov 5 2003
8 comments
1,560 views