Most settings are tied to a Workspace and some configuration/settings is only available for administrators, that are settings like permissions, custom fields, site url, email delivery, and so on. Other settings like default senders, Google Analytics, and unsubscribe settings can be made available for editors as well.
Configure a Workspace by navigating to Administration -> [Workspace] -> Manage
.
Here you can configure Workspace-level settings for:
Each workspace has a "Settings"-icon in the tree, navigate to this to configure settings on the workspace.
Here you can configure
Introduced in v11.0.10
It's also possible to set some settings using appsettings.json
. This way you can easily adjust settings depending on your environment. For example you can use a certain Email Service Provider for development/testing but ensure that the live-configuration is applied in production.
Not all settings can be applied this way, but you can:
Base URL
Here is a samle configuration:
{
"NewsletterStudio" : {
"Workspaces" : [
{
"Key" : "<your guid workspace key>",
"BaseUrl" : "https://www.lorem-ipsum.com",
"EmailServiceProvider" : {
"Alias" : "smtp",
"Settings" : {
"host" : "smtp.lorem-ipsum.com",
"username" : "send-box",
"password" : "lorem",
"useSsl" : true,
"port" : 587,
"rateLimitActive" : true,
"rateLimitItems" : 10,
"rateLimitSeconds" : 10,
"bounceActive" : true,
"bounceHost" : "bounce.lorem-ipsum.com",
"bounceUsername" : "bounce-box",
"bouncePassword" : "lorem",
"bounceUseSsl" : true,
"bouncePort" : 995,
}
}
}
]
}
}
or
{
"NewsletterStudio" : {
"Workspaces" : [
{
"EmailServiceProvider" : {
"Alias" : "smtpPickup",
"Settings" : {
"path" : "c:\temp"
}
}
}
]
}
}
You can remove the Workspace.Key
-property to make the settings apply to all workspaces.
Changes to configuration files will be applied after a application restart. When using these configuration files, configured settings are no longer editable in the UI of the backoffice.
Introduced in v11.0.10
It is also possible to provide the configuration using code by implementing INewsletterStudioOptionsAccessor
and returning an instance of NewsletterStudioOptions
. The default implementation of this interface is the class NewsletterStudioOptionsAccessor
is a singleton that just reads the appsettings but you could replace this with your own implementaiton if needed.
Here is a simple sample:
public class SiteNewsletterStudioOptionsAccessor : INewsletterStudioOptionsAccessor
{
private readonly NewsletterStudioOptions _options;
public SiteNewsletterStudioOptionsAccessor()
{
_options = new NewsletterStudioOptions();
_options.Workspaces = new List<NewsletterStudioWorkspaceOptions>()
{
new NewsletterStudioWorkspaceOptions()
{
BaseUrl = "http://www.foobar.com",
}
};
}
public NewsletterStudioOptions Value => _options;
}
// register:
services.AddSingleton<INewsletterStudioOptionsAccessor,SiteNewsletterStudioOptionsAccessor>();