• Post Reply Bookmark Topic Watch Topic
  • New Topic

On behalf of... in the From field

 
Marcus Howarth
Ranch Hand
Posts: 38
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

has anyone seen this before? It's not just a case of adding text to the name of the Address as some email clients will show differently..

I've searched through JavaMail APIs but not seen a mention of it, is it something supported or am I just not seeing something

thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This happens if the "Sender" header is different from the "From" header. Different email clients show this is different ways, some by adding the "On behalf...".

The MimeMessage class has both addFrom and addSender methods; play around with those to see if you can achieve the desired effect. Be aware that having differing From and Sender headers increases the likelihood of your message being classified as spam.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!