Using the Aspose Java Email APIs version 22.3, we’re trying to extract some additional email properties for read and delivery receipts and the “getReplyTo” list of email recipients. We’ve included a simple email test file where we’ve requested a read and delivery receipt in Outlook/O365 and attempted to use the Aspose APIs to extract this information but thus far seeing only empty results. The API documentation seems to focus primarily on sending emails instead of fetching receipt info so we’re not entirely sure this is implemented correctly but we thought that we should at least see the “getReadReceiptRequested” API actually return true.
Here’s a code snippet that shows the gist of what we’d like to fetch. Can you please provide some help with regards to the use of these APIs and the behavior that we’re seeing?
We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as EMAILJAVA-35043. You will be notified via this forum thread once this issue is resolved.
Please Load Mapi message without any conversion and print PR_READ_RECEIPT_REQUESTED property:
MapiMessage mapiMessage = MapiMessage.load("Aspose Email Receipt test Java version 22.3.msg");
System.out.println("read receipt requested=" + mapiMessage.getReadReceiptRequested());
Output:
read receipt requested=true
The ReadReceiptTo EML property used during conversion from Outlook MSG.
If MSG property PR_READ_RECEIPT_REQUESTED=true, EML property ReadReceiptTo will be assigned from sender SMTP address.
// Next line converts source MAPI MSG to EML.
// MSG PR_READ_RECEIPT_REQUESTED mapi property is true.
// During conversion ReadReceiptTo EML property will be assigned from Sender SMTP Address mapi property (PR_SENDER_SMTP_ADDRESS).
// Source MSG file does not contains Sender SMTP Address and ReadReceiptTo cannot be assigned.
MailMessage mailMessage = MailMessage.load(paths, getAsposeEmailLoadOptions(false));
// Next line converts EML to MAPI. The ReadReceiptTo EML property was not assigned in the first line. So, ReadReceiptRequested flag will be lost during reverse conversion.
MapiMessage mapiMessage = MapiMessage.fromMailMessage(mailMessage, mco);
We’re now seeing results for the read receipt and ReplyTo fields using the change suggested above. Is there any way to get the Delivery Receipt requested value as well?