Skip to content

corymartin/Mailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mailer

Simple C# email library with templating support.

Uses Mustache templates via Nustache.

API

Mailer.Send(string to, string template, dynamic templateData, params System.Net.Mail.Attachment[] attachments)

Example:

Assume templates root is C:\example\templates\ using the example template in the repo.

Mailer.Send("jim@example.com", @"password\update", new {
    firstname = "Jim",
    passwordtoken = "askf238fuhawf2983ghf"
});

If a *.html template is present, an html email will be sent.

If a *.txt template is present, a text email will be sent.

If both are present, a multipart email will be sent.

The *.cfg file has two fields, from and subject. Both are parsed as Mustache templates.


Mailer.Send(string to, string from, string subject, string body, params System.Net.Mail.Attachment[] attachments)

About

Simple C# email library with templating support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages