Search code examples
c#.net-2.0disposesmtpclient

Dispose method for smtpclient in .net 2.0


How to release resources of system.net.mail.smtpclient in .net 2.0. It does not have dispose method in .net 2.0


Solution

  • To release SMTPClient resources iam making the SMTPClient object as Null and then calling. GC.Collect. this will release the smtpclient resources.