All Projects → half-ogre → MarkdownMailer

half-ogre / MarkdownMailer

Licence: MIT License
A simple library for sending email message with Markdown bodies, that creates the text and HTML views from the Markdown.

Programming Languages

C#
18002 projects
HTML
75241 projects
CSS
56736 projects
Classic ASP
548 projects

NOTICE! This repo is very outdated and is no longer maintained.

MarkdownMailer is a simple library for sending email message with Markdown bodies, that creates the text and HTML views from the Markdown.

How to Use

Install

Install-Package MarkdownMailer

Configure

You can either pass a MailSenderConfiguration instance to the MailSender ctor, e.g.:

var mailSenderConfiguration = new MailSenderConfiguration() {
    DeliveryMethod = SmtpDeliveryMethod.Network,
    EnableSsl = true,
    Host = "smtp.gmail.com",
    Port = 587,
    UseDefaultCredentials = false,
    Credentials = new NetworkCredential("fnord@gmail,com", "password")
};

var mailSender = new MailSender(mailSenderConfiguration);

Or, you can use the default <system.net> applicaton (or web) configuration, e.g.:

<system.net>
    <mailSettings>
    <smtp deliveryMethod="Network">
        <network 
		host="smtp.gmail.com" 
		enableSsl = "true" 
        userName="[email protected]" 
        password="password" 
		port="587"/>
    </smtp>
    </mailSettings>
</system.net>

Use

var mailSender = new MailSender();
mailSender.Send("[email protected]", "[email protected]", "Test", "This is a **test**");
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].