This project has moved. For the latest updates, please go here.

The following sample code shows you a simple example using a configuration file to use with the Email Notification service.

Configuration File

<?xml version="1.0" encoding="utf-8" ?>
    <section name="EmailNotificationSettings" type="EmailNotification.Config.EmailNotificationConfigurationSectionHandler, EmailNotification" allowLocation="false" allowDefinition="Everywhere"/>
  <EmailNotificationSettings isEnabled="true">
    <ServerSettings smtpServer="" isSSLEnabled="true" smtpServerConnectionLimit="4" smtpServerPassword="password" 
                    smtpServerUser="" smtpServerRequiredLogin="true"/>
    <DefaultFrom emailAddress="" displayName="Store"></DefaultFrom>
    <TestEmailAccounts isTestEmailAccountsBlocked="true">
      <add account=""></add>

Configuring and calling Email Notification Wrapper

using System;
using System.Collections.Generic;

namespace EmailNotification.Example
    public class Example1
        public void Main()
            var emails = new List<MessageQueueEntity>
                                 new MessageQueueEntity
                                         To = "",
                                         From = "",
                                         Body = "Example Email",
                                         BodyFormat = BodyFormat.PlainText,
                                         Created = DateTime.Now

            var configuration = Master.UseAppConfig().WithEmails(emails);


Last edited Apr 21, 2011 at 1:42 PM by mjourdan, version 5


No comments yet.