• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Set FROM in context.xml

 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic