简体   繁体   中英

Send email using “on behalf of” using apache common Email

I want to send email from my application by adding "on behalf of" address. Currently I am using apache common Email to send email and it seems I couldn't specify sender in there. As I can see email headers I need to set different values for sender and from to show email receive as "on behalf of" in the mail client.

Can anyone please help me to do this using java email client or can I achieve this using same apache common client? Solution needs to be work with most of common email clients like outlook, gmail etc..

As per link

you can do

 msg.addHeader("Sender", "My Friend <xxxxxx@xxxxx.com>");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM