Configuring List Manager

In addition to usual configuration, you must add several other configuration options to your web.config file.

This is example of the altairis.MailToolkit configuration section with two mailing lists configured in the listManager element:
<altairis.mailToolkit>
    <templateResource type="SampleListManager.Resources.MailerTemplates, SampleListManager"/>
    <from address="from@example.org"/>
    <listManager verificationKey="KEz1YjQ2wGnZ/KmxwN1f9t7NK1VwAwVbN4+xl+51fQWj+Tco783YHik8uuRZnSj6nc5zrLIHyJGafNBTGhj1xQ==">
        <lists>
            <add name="MailingList1" description="Mailing list #1" 
                 type="Altairis.MailToolkit.SqlMailingListProvider, Altairis.MailToolkit"
                 connectionStringName="ListManagerDB"/>
            <add name="MailingList2" description="Mailing list #2"
                 type="Altairis.MailToolkit.SqlMailingListProvider, Altairis.MailToolkit"
                 connectionStringName="ListManagerDB"/>
        </lists>
    </listManager>
</altairis.mailToolkit>

<listManager> element

This element contains configuration of the mailing list system itself. Has the following attributes:
Name Description
verificationKey Signing key for verification requests (see below).
transportProviderName (optional) Name of configured transport provider to use for sending mailing list messages. If not provided, default configured provider is used. This settings allows you to configure different provider for transactional mail and different for mailing lists.


The mandatory verificationKey attribute contains key for computing of HMACs (Hash Message Authentication Codes), which are used for confirmation of subscription and removal. It may be any random Base64 encoded value, which should be kept secret. You may use various tool to generate random keys, such as the ASP.NET Chaos Generator (recommended settings).

<lists> collection

The lists themselves are defined in lists element. The add elements have the following attributes:
Name Description
name The logical system name of mailing list. Should not contain spaces or special characters. Is used to identify the list, to generate confirmation codes etc. Should not be changed once set up.
description The free-text friendly name of mailing list
type Type name of the mailing list provider. Currently only one provider (using SQL database) is part of the toolkit and its type name is Altairis.MailToolkit.SqlMailingListProvider, Altairis.MailToolkit
subscriptionVerificationTemplate (optional) Name of template used for subscription verification message. Defaults to ListSubscriptionVerification.
removalVerificationTemplate (optional) Name of template used for removal verification message. Defaults to ListRemovalVerification.
messageTemplate (optional) Name of template used for messages sent to list. Defaults to ListMessage.


Providers (such as the SqlMailingListProvider) may define additional configuration attributes for themselves.

Last edited Jun 3, 2013 at 1:41 PM by altair, version 2

Comments

No comments yet.