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?
String paths = "Aspose Email Receipt test Java version 22.3.msg"; MapiConversionOptions mco = MapiConversionOptions.getUnicodeFormat(); mco.setPreserveEmptyDates(true); MailMessage mailMessage = MailMessage.load(paths, getAsposeEmailLoadOptions(false)); MapiMessage mapiMessage = MapiMessage.fromMailMessage(mailMessage, mco); int notificationOptions = mailMessage.getDeliveryNotificationOptions(); boolean testDeliveryReceiptRequested = (notificationOptions == DeliveryNotificationOptions.OnSuccess || notificationOptions == DeliveryNotificationOptions.OnFailure); boolean testReadReceiptRequested = mapiMessage.getReadReceiptRequested(); String testReplyTo = mapiMessage.getReplyTo(); Logger.Debug("Email properties: Delivery receipt requested=" + testDeliveryReceiptRequested + ", read receipt requested=" + testReadReceiptRequested + ", reply to=" + testReplyTo);
Here are the results of our logging output statement:
"Email properties: Delivery receipt requested=false, read receipt requested=false, reply to="
Thank you for your help.