How to Change the Theme According to the HOST HTTP Header

This feature will work starting from v1.0.5.4.

Create the ASP.NET theme in the App_Themes folder, on the same level as DefaultTheme folder. Name it, e.g. MyTheme. Let's assume, you want to use this theme when the value of HTTP HOST header is www.mydomain.com (when user goes, e.g. to http://www.mydomain.com/webmail).

Open the file ThemeList.xml in the App_Data folder.  By default, it contains only one entry:

                <?xml version="1.0" encoding="utf-8" ?>
                <ThemeList version="1.0">
                  <Theme>
                    <DomainName>_Default</DomainName>
                    <ThemeName>DefaultTheme</ThemeName>
                  </Theme>
                </ThemeList>
            

This is the name of theme (DefaultTheme) which will be used if an appropriate domain name from HOST header does not present in the list.

Add newly created theme to the list, so that the file ThemeList.xml looks like

                <?xml version="1.0" encoding="utf-8" ?>
                <ThemeList version="1.0">
                  <Theme>
                    <DomainName>_Default</DomainName>
                    <ThemeName>DefaultTheme</ThemeName>
                  </Theme>
                  <Theme>
                    <DomainName>www.mydomain.com</DomainName>
                    <ThemeName>MyTheme</ThemeName>
                  </Theme>
                </ThemeList>
            

Now, if HOST request header contains www.mydomain.com, the application will serve theme MyTheme.


If you have further questions, please submit it from our Support Page.

Back to the list of documents

Back to the Mail Server .NET FAQ

Back to the Mail Server .NET