Atozed Forums

Full Version: How can I tell if email has been read Indy 10?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to tell if a recipient has opened or even received the email I sent?   I've looked everywhere in idSMTP and idMSG.  I see that idMSG has a ReceiptRecipients property and idSMTP has an OnFailedRecipient, but I don't know how to make use of either of these.
I would like to know as well
(01-02-2022, 07:02 PM)OldBob1938 Wrote: [ -> ]Is there a way to tell if a recipient has opened or even received the email I sent?

Not reliably, no.

At the email level, you can request a "Message Disposition Notification" (RFC 8098), aka a "Read Receipt", by including a Disposition-Notification-To (or older Return-Receipt-To) header in the email, specifying the email address(es) where the notification should be sent back to.  The notification will then be sent to that inbox(es), which you can access via POP3 or IMAP.  But, as this is an opt-in feature, not all recipients will reply (for instance, I configure my email clients to ignore requests for read receipts).

At the SMTP level, there are several protocol extensions for requesting Delivery Status Notifications (RFC 3461) to the sender's inbox, and Message Tracking (RFC 3885) on the SMTP server. However, this requires per-server implementations of these extensions, and besides Indy's TIdSMTP does not implement those extensions at this time anyway (https://github.com/IndySockets/Indy/issues/394).

(01-02-2022, 07:02 PM)OldBob1938 Wrote: [ -> ]I see that idMSG has a ReceiptRecipients property and idSMTP has an OnFailedRecipient, but I don't know how to make use of either of these.

The TIdMessage.ReceiptRecipient property (singular, not plural) implements a Read Receipt request via the Disposition-Notification-To (and Return-Receipt-To) email headers.

The TIdSMTP.OnFailedRecipient event is fired when the currently-connected SMTP server refuses to deliver the email to a specific recipient. The event allows you to choose whether to ignore the error (in case of multiple recipients) or fail the send.