There seems to be a problem when using System.Net.Mail to send emails to
multiple recipients when one or more of the recipient addresses is incorrect
and the destination SMTP server is using recipient filtering a la Postfix.
Sending to a single bad address ba**@test.com returns the correct error.
Mailbox unavailable. The server response was: <ba**@test.com>: Recipient
address rejected: User unknown in relay recipient table
If I sent a message to go***@test.com,go***@test.com,ba**@test.com
then I get.
Failure sending mail.
and no mail is delivered, whether the recipients are good or bad.
Surely this is wrong?
If I do this the hard way with an SMTP conversation then each address will
be the subject of a separate RCPT TO: line
e.g.
RCPT TO:go***@testdom.com
OK
RCPT TO:go***@testdom.com
OK
RCPT TO:ba**@testdom.com
Recipient address rejected: User unknown in relay recipient table
DATA
Ok
etc etc blah blah
..
OK, Message queued :123456789
Good1 and Good2 both get the message.
Is there a way around this? In these days of directory harvesting spam such
address filtering is very common. Lets consider a long list of recipients in
which one user left the company yesterday. In this scenario none of the good
recipients get a perfectly legit message.
Help will be greatly appreciated.
--
Bob