The current problem lies when using the new MailMessage. Before, you would use the MailMessage implemented on System.Web.Mail, which was quite limiting, but did the work. The .NET Framework 2.0, introduced the new MailMessage from System.Net.Mail. It is an order of magnitude better.
So, you go about converting your code and it is pretty much a simple game of changing a few method names and you're done. There lies the problem.
The new MailMessage needs to be disposed!!!
In a long time, this is the first leak that we had in Sampa. It is pretty hard to have memory leaks in C#, but not that hard to have Handle Leaks. Just forget to Dispose or Close a network connection, or a file handle, or a Bitmap and you have a Handle Leak.
Sampa makes extensive use of email. Every time people sign up, register to the newsletter, or somebody leaves a comment on a Sampa site, or a user is added/removed, an email is sent. There are another dozen cases where we send email. We were leaking a Handle each time an email was sent.
The worst case was when we had Attachments on the message. That leak was worse because it held a handle to the file to be attached to the message. So any attempt to rewrite or delete that file (which was usually a temporary file) failed and it meant that we are leaking multiple handles in a single call.