Adding Smtp section in appsettings, registering IEmailSender as an email service and ofc the MailKit nuget in Infrastructure proj

This commit is contained in:
Elitsa Marinovska
2020-05-20 00:24:55 +02:00
parent ad31db9f4a
commit 16d805e6f5
3 changed files with 12 additions and 0 deletions

View File

@@ -320,6 +320,7 @@ namespace Umbraco.Core.Runtime
composition.RegisterUnique<IEventMessagesAccessor, HybridEventMessagesAccessor>();
composition.RegisterUnique<ITreeService, TreeService>();
composition.RegisterUnique<ISectionService, SectionService>();
composition.RegisterUnique<IEmailSender, EmailSender>();
composition.RegisterUnique<IExamineManager, ExamineManager>();

View File

@@ -11,6 +11,7 @@
<PackageReference Include="LightInject.Annotation" Version="1.1.0" />
<PackageReference Include="LightInject.Microsoft.DependencyInjection" Version="3.3.0" />
<PackageReference Include="LightInject.Microsoft.Hosting" Version="1.2.0" />
<PackageReference Include="MailKit" Version="2.6.0" />
<PackageReference Include="Markdown" Version="2.2.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.2" />

View File

@@ -116,6 +116,16 @@
"Replacement": ""
}
]
},
"Global": {
"Smtp": {
"From": "noreply@example.com",
"Host": "127.0.0.1",
"Port": 25,
"UserName": "username",
"Password": "password",
"DeliveryMethod": "network"
}
}
}
}