SaaS CMS has officially launched! Learn more now.

Developers Guide - EPiServer Mail

EPiServer Mail is powerful software for the distribution of emails and newsletters, and is designed to handle very large numbers of email recipients. EPiServer Mail consists of a client (administration) part and a server part, both of which are described in this Developer Guide.

About EPiServer Mail

In the client part, the EPiServer Mail Editor, the email or newsletter is created and the distribution is initiated. An order email with content and recipient data is sent to our dedicated EPiServer Mail Server Cluster. This cluster of servers then distributes the emails or newsletters without consuming valuable power from the sender’s IT environment. Detailed real-time statistics for each newsletter is available instantly.

Messages are created in the web based EPiServer MailEditor. HTML mail can be composed using the built-in HTML editor or by selecting a page already created in EPiServer CMS or by providing a URL.

  • An order email is sent to the EPiServer Mail Broker, which calculates the most efficient way to distribute the message to the recipients via the servers in its cluster, taking into account current load and queue length for each distribution server.

Creating and Managing Recipients Lists

From a developers perspective all recipient sources inherits and implements the IRecipientSource Interface. Each recipient source can provide any number of recipients lists (of the type RecipientContainer).

One implementation that supports recipient’s lists import is included with the EPiServer Mail Editor, and does not need to be implemented by the developer. This recipient source is called “Standard” and is used whenever a list is to be imported.

However, in many cases there is need for dynamic recipient’s lists, to integrate EPiServer Mail with an existing system where the recipient information resides.

Most commonly, such a list is generated by database queries. To do this you need to implement the IRecipientSource Interface. This is described in the Recipient Sources document - a code sample is also available in this developers guide section.

Handling Unsubscriptions

In the unsubscribe system of EPiServer Mail, the recipient can choose to unsubscribe only to a mailing of a certain category, for instance a weekly newsletter. The recipient will be excluded from all further mailings of this category. The recipient can also choose to unsubscribe to all mailings from this particular EPiServer Mail sender installation. The recipient will not receive any future mailings from this site. When the recipient clicks on the unsubscribe link in the mailing, the unsubscribe option page will be displayed. The recipient can then choose either option to unsubscribe.

Add the hyperlink (which copies the unsubscribeUrl value) and insert it into the HTML template of your choice.

<a href="§unsubscribeUrl§">Unsubscribe yourself</a>

§unsubscribeUrl§ will be substituted with information from the episervermail.config file (the unsubscribe attribute on the element editor). With the default configuration you will be directed to the example page which comes with installation.

Receiving the EPiServer Mail Developer License

See the information under Developer License Required? in the EPiServer Mail Installation Instructions document.

Using Code Samples and Templates

Code samples and templates for EPiServer Mail are available in the Download section of EPiServer World.