EmailService

postal · email, email-sending, smtp, view-rendering

Main email sending service that renders views and dispatches emails.

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

namespace Postal
{
    /// <summary>
    /// Sends email using the default <see cref="SmtpClient"/>.
    /// </summary>
    public class EmailService : IEmailService
    {
        /// <summary>
        /// Creates a new cref="EmailService"/, using the default view engines.
        /// </summary>
        public EmailService() : this(ViewEngines.Engines)
        {
        }

        /// <summary>Creates a new <see cref="EmailService"/>, using the given view engines.</summary>
        /// <param name="viewEngines">The view engines to use when creating email

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

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

Get a free API key