Configuring EPiServer Mail in an Enterprise Environment

 

Product version:

EPiServer Mail 5 and 5 R2

Document last saved:

{DynamicContent:PagePropertyPlugin}

Using Separate Broker Account Configurations in EPiServer Mail in an Enterprise Environment

The EPiServerMail.config file is located in the web root and is an extension of web.config. This means that it is not compatible with the old EPiServer Mail 4.3 configuration file format. During installation, a default configuration is deployed and populated with data collected from user input. If left that way, every site will share the same configuration.

On an enterprise solution, there might be times where some sites need to have their own specific configurations

  1. Add a new element under configuration/episerver.common/siteHosts in web.config. The name attribute is used to reference this site and the hostUrl attribute is used to determine in what context the configuration is used.
  2. Duplicate the episerver.mail/sites/site node in EPiServerMail.config and modify the hostName attribute of your copy to match the name attibute of your new siteHosts element and alter all other configuration that might differ (such as URLs, default values, SMTP server, etc).
  3. On your new site configuration element, make sure that the brokerName attribute on the broker element is empty and also preferrably remove the rsaKeyValue element if there is one.
  4. Use the EPiServer Mail activation procedure, but you need to manually merge the site element from the received file to your existing EPiServerMail.config. This is due to that the received file will only contain information of the newly registered site.

If you want to keep accumulated data separate between sites using separate databases, proceed to the next section.

Using Separate Databases in EPiServer Mail in an Enterprise Environment

Using the instructions above, the broker accounts are separated from each other. To also have EPiServer Mail use separate databases for each site, do the following:

  1. Deploy a new EPiServer Mail database using EPiServer Deployment Center, Install SQL Database.
  2. Add a new element for this under connectionStrings in connectionStrings.config and fill in the details used in the previous step.
  3. Change the reference on your new siteHosts element under configuration/episerver.common/siteHosts in web.config to reference your new connectionString in the connectionStringName element.
  4. Add a site element under configuration/episerver.common/sites in web.config with the hostName attribute set to match the name attribute of the siteHosts element you just created.