Skip to content

GorillaGeek/gorilla.mailer.sendgrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gorilla Geek Mailer

Install from nuget: https://www.nuget.org/packages/Gorilla.Mailer.SendGrid/

Install-Package Gorilla.Mailer.SendGrid

How to use

IMailer mailer = Gorilla.Mailer.Providers.SendGridMailer("apikey");
var providerResultKey = await mailer.Send("Subject", "From", "To", "Body");

Template

From String:

var template = MailerTemplate.CreateFromString("Your template here [TemplateVariable]");
template.Params.Add("TemplateVariable", "with variables");

var body = template.Render();

From File:

var template = MailerTemplate.CreateFromFileSystem("path-to-file");

From Namespace:

// Remember to change the file property 'Buld Action' to 'Embedded Resource'
var path = "MyApp.Templates.Email.html";
var template = MailerTemplate.CreateFromManifestResourceStream(path);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages