File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Set FROM in context.xml " Watch "Set FROM in context.xml " New topic
Author

Set FROM in context.xml

Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130
Hello!


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?


Regards
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="from@email.com" the mail is sent, and the FROM is set to: username@mycomputername and not to the from@email.com

Any more hints?


Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Set FROM in context.xml