andrewdavey / postal

Email sending for asp.net mvc using the view engine system to render emails.
http://aboutcode.net/postal
MIT License
536 stars 169 forks source link

Sample For Postal.AspnetCore? #175

Closed epozsh closed 5 years ago

epozsh commented 5 years ago

Hello,

is there any sample for Asp.Net Core MVC

hermanho commented 5 years ago

https://github.com/hermanho/postal.aspnetcore.samples

huseyingoztok commented 4 years ago

How to inject IEmailService in .net core 3.1. Please give me example @andrewdavey @hermanho I am using autofac

hermanho commented 4 years ago

Hi @huseyingoztok, you would need to implement the types registration in autofac. Here is the code in asp.net core DI. https://github.com/hermanho/postal.aspnetcore/blob/674bfcf333e8d32f3d304ba43343418198f6f864/src/Postal.AspNetCore/ServiceCollectionExtensions.cs#L15 https://github.com/hermanho/postal.aspnetcore.samples/blob/881e13618d2c28e650c682e951beb253e65afe4c/WebSample/Startup.cs#L32