Skip to content

IowaComputerGurus/netcore.utilities.email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Email utility methods for processing messages, used by both the ICG SMTP & SendGrid utilities

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published