Board index » delphi » Sending mails with IdSMTP with invalid mail addresses

Sending mails with IdSMTP with invalid mail addresses


2005-03-03 11:20:57 PM
delphi101
Hi there.
I am sending a mail with IdSMTP and IdMessage to several hundred BCC
recipients (NOT SPAM).
This works fine if all the mail addresses are valid.
If one or more addresses are invalid, nobody receives the mail.
How can I avoid this, and just have all the valid recipients receive the
mail and bounce the invalid recipients?
DevDude
 
 

Re:Sending mails with IdSMTP with invalid mail addresses

"Ove Bjerregaard" <XXXX@XXXXX.COM>skrev i en meddelelse
Quote
I am sending a mail with IdSMTP and IdMessage to several hundred BCC
recipients (NOT SPAM).
If one or more addresses are invalid, nobody receives the mail.
How can I avoid this, and just have all the valid recipients receive the
mail and bounce the invalid recipients?
By sending one mail per recipient?
--
Finn Tolderlund
 

Re:Sending mails with IdSMTP with invalid mail addresses

"Ove Bjerregaard" <XXXX@XXXXX.COM>writes
Quote
If one or more addresses are invalid, nobody receives the mail.
Correct. Indy throws an exception whenever the server sends a failed
response to a command. Thus the message data is not even being sent to the
server at all since all of the recipient addresses have to be specified
before the message is sent.
Quote
How can I avoid this, and just have all the valid recipients
receive the mail and bounce the invalid recipients?
Don't specify multiple recipients in a single message. Send the message
multiple times. TIdSMTP does not support ignoring failed addresses. One
failure aborts the entire operation.
Gambit
 

Re:Sending mails with IdSMTP with invalid mail addresses

"Remy Lebeau (TeamB)" <XXXX@XXXXX.COM>writes
Quote
Don't specify multiple recipients in a single message. Send the message
multiple times. TIdSMTP does not support ignoring failed addresses. One
failure aborts the entire operation.
If you must specify multiple recipients per message, then you will need to
program to the SMTP protocol manually instead of using TIdSMTP in order to
ignore failed addresses and continue the send. Until Indy's programmers
update TIdSMTP to better support this scenerio.
Gambit
 

Re:Sending mails with IdSMTP with invalid mail addresses

Thanks for you reply.
Now I know what to do.
DevDude
"Remy Lebeau (TeamB)" <XXXX@XXXXX.COM>skrev i en meddelelse
Quote

"Ove Bjerregaard" <XXXX@XXXXX.COM>writes
news:42272b57$XXXX@XXXXX.COM...

>If one or more addresses are invalid, nobody receives the mail.

Correct. Indy throws an exception whenever the server sends a failed
response to a command. Thus the message data is not even being sent to
the
server at all since all of the recipient addresses have to be specified
before the message is sent.

>How can I avoid this, and just have all the valid recipients
>receive the mail and bounce the invalid recipients?

Don't specify multiple recipients in a single message. Send the message
multiple times. TIdSMTP does not support ignoring failed addresses.
One
failure aborts the entire operation.


Gambit


 

Re:Sending mails with IdSMTP with invalid mail addresses

Thanks for you reply.
Now I know what to do.
DevDude
"Finn Tolderlund" <XXXX@XXXXX.COM>skrev i en meddelelse
Quote

"Ove Bjerregaard" <XXXX@XXXXX.COM>skrev i en meddelelse
news:42272b57$XXXX@XXXXX.COM...
>I am sending a mail with IdSMTP and IdMessage to several hundred BCC
>recipients (NOT SPAM).
>If one or more addresses are invalid, nobody receives the mail.
>How can I avoid this, and just have all the valid recipients receive
the
>mail and bounce the invalid recipients?

By sending one mail per recipient?
--
Finn Tolderlund


 

Re:Sending mails with IdSMTP with invalid mail addresses

"Ove Bjerregaard" <XXXX@XXXXX.COM>writes
Quote
Now I know what to do.
This issue is currently in discussion amongst Indy's programmers, and they
are close to agreeing on an implementation that would allow graceful
handling failed multi-recipient messages so that the message is still sent
to successful addresses.
Gambit