EmailViewRenderer

postal · email, view-rendering, razor-templates

Renders Razor email views to string output with view engine support.

// Source: https://github.com/andrewdavey/postal | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
using System;
using System.IO;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Postal
{
    /// <summary>
    /// Renders <see cref="Email"/> view's into raw strings using the MVC ViewEngine infrastructure.
    /// </summary>
    public class EmailViewRenderer : IEmailViewRenderer
    {
        /// <summary>
        /// Creates a new <see cref="EmailViewRenderer"/> that uses the given view engines.
        /// </summary>
        /// <param name="viewEngines">The view engines to use when rendering email views.</param>
        public EmailViewRenderer(ViewEngineCollection viewEngines)
        {
            this.viewE

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key