posted 1 month ago
I had this problem a while back when building a list server and solved it using a creating an instance of Session by passing in properties including mail.smtp.from. I am just leaving for work so I can't dig into now, but here's the code (more than what you need) that I used to create the Session which supported envelope from.
In the list server's delivery agent, a session was creating with: