Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

add on behalf to another in mail  RSS feed

 
satish sas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Please can any one tell me how to add "on behalf to another" in mailer using java.
Is there is any way to solve this problem.
Thanks
 
Rob Spoor
Sheriff
Posts: 21047
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Besides the from address, you can give an e-mail message a sender and zero or more reply-to addresses. It is both the from address and the sender you will need to set. MimeMessage has a method called setSender you can use for this.

I can't remember which it will use in replying though, but you can use a reply-to for that.
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If that goes in a header, then use the addHeader(name, value) method of MimeMessage.

I don't have any examples of such a message to see if it's a header and, if so, what the name of the header is. But presumably you do. Or you can generate one to look at.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!