System.Net.Mail SmtpClient - Common causes of Insufficient system storage error?

The error I am getting is: Base exception: System.Net.Mail.SmtpException: Insufficient system storage. The server response was: 4.3.1 Insufficient system resources

I have tried:

  • Checking the mailbox to ensure it has space
  • Increasing storage space on the mail server against all drives
  • Turning off backpressure checks

The strange part is that every second email succeeds without fail which leads me to believe it might be the queue which is causing me issues? I was wondering if there are any ways to diagnose this? Or could it be that the connection isn't closing and holding on a bit longer which is causing the subsequent connection to have issues in terms of resources.

The code is as follows:

SmtpClient client = new SmtpClient("mymailserver.com");
MailMessage mailMessage = new MailMessage();
mailMessage.From = new MailAddress("from@email.com", "test");
mailMessage.To.Add(new MailAddress("to@email.com"));
mailMessage.Body = "System.Net.Mail Mail Client";
mailMessage.Subject = $"Test Email";
client.Send(mailMessage);
client.Dispose();

Are there any other key things to look at?