ensures the mail usage is disposed.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user