An error similar to the following may occur when sending
emails to multiple recipients through ASP.NET and SMTPClient.
Insufficient system storage
Most mail servers have a fixed limit on the maximum amount of recipients per
session. The SMTPClient class in .NET 2.0 uses connection pooling so multiple
messages may use the same connection even if the SMTPClient object is created
The best approach to this issue is to use error handling to catch the specific
error message and resend.
Dim s As New SmtpClient
Dim m As New MailMessage
s.Host = "localhost"
s.Port = 25
Catch ex As SmtpException
If ex.StatusCode = SmtpStatusCode.InsufficientStorage Then
'Send again to ensure this email gets sent
'Handle other SMTP errors here.
Response.Write("Error: " & ex.Message)