November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Product version: |
EPiServer Mail 4.4 SP1 |
---|---|
Document version: |
1.0 |
Document last saved: |
For larger organizations, it is possible to create different “sites” that selected users or groups can be given access to. See the section System Settings – Users and User Groups.
To implement your own recipient source you need to implement the IRecipientSource interface.
The Recipient class is defined in the EPiServer.Mail.Core namespace. The Recipient class defines the following public properties:
The RecipientContainer class represents a specific list of recipients. One of the properties of a RecipientContainer is an implementation of the IRecipientSource interface that the RecipientContainer was provided by.
This section describes the properties and methods defined in the IRecipientSource Interface in the EPiServerMail.Core.Sources namespace that is required at implementation. For methods and properties that adds or removes recipients, see the IRecipientStore interface.
This section describes the properties and methods defined in the IRecipientStore Interface in the EPiServerMail.Core.Sources namespace that is required at implementation.
Place the compiled assembly in the bin directory on the web server.
When running EPiServer Mail together with EPiServer Community or EPiServer CMS 4.x there are options to install implementations of IRecipientSource for these, during the EPiServer Mail installation. The EPiServer Community source selects all current EPiServer Community users with the subscription user attribute set. The name of the attribute can be specified in the configuration file. The EPiServer CMS source selects all current EPiServer CMS users. The sample code provided in this Developers Guide is an example of a custom source.
EPiServer Mail can import e-mail address lists from XML and CSV text files (semi colon separated).
Most commonly email lists are imported from Excel.
When importing email addresses from Microsoft Excel the file needs to be saved in a specific format. Please see instructions below.
The first row is a header row and is not imported to EPiServer Mail. The first column is always used as the email address. It is possible to import a list that consists of only one column with email addresses. In the example above, there are additional columns with variables such as Name, Sur Name and Title. These variables can be used for different needs and are used to personalize each email sent from EPiServer Mail.
EPiServer Mail handles up to 20 variables for each recipient list.
Save the Excel sheet as a CSV-file (semi colon separated) and make sure that the file has the format UTF-8. If it is not possible to make sure that the CSV-file is in UTF-8format, open the file with a regular text editor, such as Notepad, and save the file again making sure that the file is in UTF-8 format.
An email list can also be imported from an XML-file. See below for an example of a compatible XML-file:
<?xml version="1.0" encoding="utf-8" ?>
<EPiServerMailImport>
<attributes>
<attribute id="1">attributeName1</attribute>
<attribute id="2">attributeName2</attribute>
<attribute id="3">attributeName3</attribute>
</attributes>
<recipient>
<email>email1@example.com</email>
<attributeList>
<attribute id="1">attribute value for attr 1</attribute>
<attribute id="2">attribute value for attr 2</attribute>
<attribute id="3">attribute value for attr 3</attribute>
</attributeList>
</recipient>
<recipient>
<email>email2@example.com</email>
<attributeList>
<attribute id="1">attribute value for attr 1</attribute>
<attribute id="2">attribute value for attr 2</attribute>
<attribute id="3">attribute value for attr 3</attribute>
</attributeList>
</recipient>
<recipient>
<email>email3@example.com</email>
<attributeList>
<attribute id="1">attribute value for attr 1</attribute>
<attribute id="2">attribute value for attr 2</attribute>
<attribute id="3">attribute value for attr 3</attribute>
</attributeList>
</recipient>
</EPiServerMailImport>