100% Australian Windows Web Hosting
  • Knowledge Base

Insufficient system storage error when using SMTPClient 

Was this helpful? (4) (1)

An error similar to the following may occur when sending emails to multiple recipients through ASP.NET and SMTPClient.

System.Net.Mail.SmtpFailedRecipientException: 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 each time.

The best approach to this issue is to use error handling to catch the specific error message and resend.

VB.NET Example

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)

End If

End Try




Copyright © 2002 - 2021 StudioCoast Pty Ltd   |   ABN: 53 143 039 070