A very simple question: how to obtain the mail server name?

In our JSP application, at one point an email will be sent to notify one event. Currently, that is done by using the html tag: mailto. To have more control on the email in tems of context format (a bad layout right now) and others. I would like to have it processed at servlet by using the JavaMail API, so that it have a nice format and have the sender's email address right in case email client is not installed in the machine where the browser in. The JavaMail API is straight forward. The question is how to obtain the mail server name, and the sender's email address if there is one?

Thanks.

v.

[628 byte] By [vwuvancouver] at [2007-9-26 1:23:48]
# 1

How to obtain the mail server's name? It's your server, you should know its name. Or if it isn't your server, you should ask the administrator for its name. Point is, you need to decide in advance what server you are going to use and hard-code its name into the program or into a properties file.

And how to obtain the client's e-mail address? You have to ask the client, probably by putting a box in the HTML and asking them to type it.

DrClap at 2007-6-29 1:02:58 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...