ensures the mail usage is disposed.

This commit is contained in:
Shannon
2014-01-13 17:28:49 +11:00
parent aebc30c7a3
commit 23b0c89848

View File

@@ -323,8 +323,14 @@ namespace Umbraco.Core.Services
{
try
{
var sender = new SmtpClient();
sender.Send(mail);
using (mail)
{
using (var sender = new SmtpClient())
{
sender.Send(mail);
}
}
}
catch (Exception ex)
{