Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 2.14 KB

README.md

File metadata and controls

60 lines (40 loc) · 2.14 KB

NetCore.Utilities.Email

Build Status

This is a base library to provide utilities for working with email in .NET 6. This project is used by more concrete implementations such as NetCore.Utilities.Email.Smtp.

Breaking Changes (Version 7.0)

Starting with version 7.0, all IEmailService methods have been converted to asynchronous operations.

Installation

Standard installation via NuGet Package Manager

Install-Package ICG.NetCore.Utilities.Email

However, it should be noted this is typically added by association from other packages

Setup

To setup the needed dependency injection items for this library, add the following line in your DI setup.

services.UseIcgNetCoreUtilitiesEmail();

You can then configure email templates inside of your applications configuration file.

{
  "EmailTemplateSettings": {
    "DefaultTemplatePath": "Template.html",
    "AdditionalTemplates": { "SpecialTemplate": "File.html" }
  }
}

You may configure as many additional templates as desired. All paths are relative to the ContentRoot as identified in the IHostingEnvironment value for the currently running application.

Usage

Inline code documentation is included for usage within the application.

Template Tokens

The following tokens are utilized in the templating process

  • [SUBJECT]
  • [PREVIEW]
  • [CONTENT]

Related Projects

ICG has a number of other related projects as well