I am testing my email function in developer connected to internet and when sending to a distributed list of receivers the program does not catch those receivers that fail to be delivered if any are a success. I just get a message to my email account to inform me of none delivery to specific user.
*For i As Integer = 0 To recipients.Count() - 1
mailMessage.To.Clear()
mailMessage.To.Add(New System.Net.Mail.MailAddress(recipients(i).EmailAddress, recipients(i).UserName))
Next
Dim userState As Object = mailMessage
Try
smtpClient.SendAsync(mailMessage, userState)
Catch failedRec As System.Net.Mail.SmtpFailedRecipientsException
'Choose to resend?
End Try*
I was hoping to catch each recipient exception here ? so that i can process a failure to send notice instead of a current success as is the case on both failure and succeed.