diff --git a/cmd/init.go b/cmd/init.go
index c5dfce1..13d0644 100644
--- a/cmd/init.go
+++ b/cmd/init.go
@@ -46,15 +46,16 @@ const (
// constants contains static, constant config values required by the app.
type constants struct {
- RootURL string `koanf:"root_url"`
- LogoURL string `koanf:"logo_url"`
- FaviconURL string `koanf:"favicon_url"`
- FromEmail string `koanf:"from_email"`
- NotifyEmails []string `koanf:"notify_emails"`
- EnablePublicSubPage bool `koanf:"enable_public_subscription_page"`
- Lang string `koanf:"lang"`
- DBBatchSize int `koanf:"batch_size"`
- Privacy struct {
+ RootURL string `koanf:"root_url"`
+ LogoURL string `koanf:"logo_url"`
+ FaviconURL string `koanf:"favicon_url"`
+ FromEmail string `koanf:"from_email"`
+ NotifyEmails []string `koanf:"notify_emails"`
+ EnablePublicSubPage bool `koanf:"enable_public_subscription_page"`
+ SendOptinConfirmation bool `koanf:"send_optin_confirmation"`
+ Lang string `koanf:"lang"`
+ DBBatchSize int `koanf:"batch_size"`
+ Privacy struct {
IndividualTracking bool `koanf:"individual_tracking"`
AllowBlocklist bool `koanf:"allow_blocklist"`
AllowExport bool `koanf:"allow_export"`
diff --git a/cmd/settings.go b/cmd/settings.go
index d2a0617..1d28dd3 100644
--- a/cmd/settings.go
+++ b/cmd/settings.go
@@ -14,14 +14,15 @@ import (
)
type settings struct {
- AppRootURL string `json:"app.root_url"`
- AppLogoURL string `json:"app.logo_url"`
- AppFaviconURL string `json:"app.favicon_url"`
- AppFromEmail string `json:"app.from_email"`
- AppNotifyEmails []string `json:"app.notify_emails"`
- EnablePublicSubPage bool `json:"app.enable_public_subscription_page"`
- CheckUpdates bool `json:"app.check_updates"`
- AppLang string `json:"app.lang"`
+ AppRootURL string `json:"app.root_url"`
+ AppLogoURL string `json:"app.logo_url"`
+ AppFaviconURL string `json:"app.favicon_url"`
+ AppFromEmail string `json:"app.from_email"`
+ AppNotifyEmails []string `json:"app.notify_emails"`
+ EnablePublicSubPage bool `json:"app.enable_public_subscription_page"`
+ SendOptinConfirmation bool `json:"app.send_optin_confirmation"`
+ CheckUpdates bool `json:"app.check_updates"`
+ AppLang string `json:"app.lang"`
AppBatchSize int `json:"app.batch_size"`
AppConcurrency int `json:"app.concurrency"`
diff --git a/cmd/subscribers.go b/cmd/subscribers.go
index ab874e8..db161f2 100644
--- a/cmd/subscribers.go
+++ b/cmd/subscribers.go
@@ -367,7 +367,7 @@ func handleUpdateSubscriber(c echo.Context) error {
return err
}
- if !req.PreconfirmSubs {
+ if !req.PreconfirmSubs && app.constants.SendOptinConfirmation {
_, _ = sendOptinConfirmation(sub, []int64(req.Lists), app)
}
@@ -725,7 +725,7 @@ func insertSubscriber(req subimporter.SubReq, app *App) (models.Subscriber, bool
}
hasOptin := false
- if !req.PreconfirmSubs {
+ if !req.PreconfirmSubs && app.constants.SendOptinConfirmation {
// Send a confirmation e-mail (if there are any double opt-in lists).
num, _ := sendOptinConfirmation(sub, []int64(req.Lists), app)
hasOptin = num > 0
diff --git a/frontend/src/views/settings/general.vue b/frontend/src/views/settings/general.vue
index c011bd5..38e711b 100644
--- a/frontend/src/views/settings/general.vue
+++ b/frontend/src/views/settings/general.vue
@@ -6,17 +6,22 @@
placeholder='https://listmonk.yoursite.com' :maxlength="300" />
-