Better control of multiple-recipients list.

Giganews Newsgroups
Subject: Better control of multiple-recipients list.
Posted by:  Marcio Ehrlich (nous…@nouser.com)
Date: Sun, 28 Sep 2003

This sequence we find in many Indy examples to send an e-mail works fine
when every recipient in a CC or BCC list does not trigger an error:
  SMTP.Connect;
  try
    SMTP.Send(NewMessage);
  finally
    SMTP.Disconnect;
  end;
What I have found is that if the 491st address in a 500 items list gets an
error (like DNS not found or "can not check MX..."), the message is not sent
at all and the flow follows to the "finally".
Is there a better way to control a multiple-recipients list, so the
remaining 499 addresses be sent even if we find an error among them?
TIA.
Marcio Ehrlich

Replies