File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Set FROM in context.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Set FROM in context.xml " Watch "Set FROM in context.xml " New topic

Set FROM in context.xml

Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130

My context.xml looks like:

I want to put FROM also in this Context. For now it's hard-coded:

I'm picking values with:

How can i set the FROM value with contex.xml?

Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

I think you can use the "mail.smtp.from" property.

You can read more about which properties you can set here: JavaMail: Package com.sun.mail.smtp Description

Regards, Rene Larsen
Dropbox Invite
Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130
Thank You for the answer, Rene!

When I set mail.smtp.from="" the mail is sent, and the FROM is set to: username@mycomputername and not to the

Any more hints?

I agree. Here's the link:
subject: Set FROM in context.xml
jQuery in Action, 3rd edition