简体   繁体   中英

Javamail (SMTPMessage/MimeMessage): ask for confirmation if the email was seen

I'm currently working on a simple app in Java that sends emails and I was wondering how can I make a message (MimeMessage/SMTPMessage) that asks to send confirmation (which says that the message was seen by recipient) after opening the message. I have received some messages like this in the past.

Thanks for your help, Assaultus Maximus :)

SMTPMessage msg = new SMTPMessage(session);
// msg.addHeader("Disposition-Notification-To","info@host");
msg.setReturnOption(SMTPMessage.RETURN_FULL);
msg.setNotifyOptions(SMTPMessage.NOTIFY_SUCCESS);

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