|Subject:||Re: TIdSMTPFailedRecipient and OnFailedRecipient with Indy 9|
|Posted by:||Remy Lebeau \(Indy Team\) (re…@lebeausoftware.org)|
|Date:||Mon, 25 Oct 2010|
"Louis Valmeras" <valmlou…@hotmail.com> wrote in message
> I am using Indy 9 TIdSMTP to send emails. I would like
> to check emails which are not received because for
> exemple invalid email address.
The only way to do that in Indy 9 is to attach a separate TIdLog...
component, such as TIdLogEvent, to track the outgoing commands manually, and
then set a flag in your code while the RCPT TO command is in progress. If
Send() fails, and the flag is set, then you will know that the server
reported an invalid recipient.
However, that will not catch all possible recipient errors (not even in Indy
10 with its OnFailedRecipient event). Some delivery errors cannot be
detected until the final delivery is attempted. In that situation, the
server will not report an error TIdSMTP, but will instead send an error
email to the milbox of the email address you are sending the sending from.
You will have to look for that separately.
> How can I ... check if emails are received?
The server caches the outgoing email and then sends it on its own time.
Once you give the email data to the server and it accepts it without error,
final delivery of the email is out of your hands. The only way to detect
that the email is actually delivered is to use a Read Receipt (the
TIdMessage.ReceiptRecipient property), however the receiver has to support
that and have it enabled (most email readers allow users to disable that).
The receipt is sent to the mailbox of the specified email address, so you
would have to monitor the mailbox separate for that, as well as error emails
as described above.
Remy Lebeau (TeamB)
TIdSMTPFailedRecipient and OnFailedRecipient with Indy 9 posted by Louis Valmeras on Mon, 25 Oct 2010