I currently setting up a little tool for my company that is used to send info-mails to specific user groups. But if one or more email addresses are incorrect (missing letter etc.) I get following error and the email isn't sent at all:
EIdSMTPReplyError
Requested action not taken: mailbox unavailable invalid DNS MX or A/AAAA resource record
I set up the email like this:
Is there a way to set up the email so atleast the other recipients are getting the email?
Some Infos:
Thanks in advance <3
TIdSMTP
has an OnFailedRecipient
event:
type
TIdSMTPFailedRecipient = procedure(Sender: TObject; const AAddress, ACode, AText: String;
var VContinue: Boolean) of object;
AAddress
is the email address, and ACode
and AText
contain the error details.
If VContinue
is set to True (the default when OnFailedRecipient
is assigned), the failed email is skipped and the next recipient is attempted.
The EIdSMTPReplyError
exception is raised if either:
OnFailedRecipient
is not assigned when a recipient fails.
VContinue
is set to False.
all recipients fail, regardless of OnFailedRecipient
.