diff --git a/config/config.json b/config/config.json index abfbdf4af5..4b93d36f69 100644 --- a/config/config.json +++ b/config/config.json @@ -87,6 +87,7 @@ "RequireEmailVerification": false, "FeedbackName": "", "FeedbackEmail": "", + "FeedbackOrganization": "", "SMTPUsername": "", "SMTPPassword": "", "SMTPServer": "", diff --git a/i18n/en.json b/i18n/en.json index 792e12969a..26ba3141c9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1363,6 +1363,10 @@ "id": "api.templates.email_footer", "translation": "To change your notification preferences, log in to your team site and go to Account Settings > Notifications." }, + { + "id": "api.templates.email_organization", + "translation": "Sent by " + }, { "id": "api.templates.email_info", "translation": "Any questions at all, mail us any time: {{.SupportEmail}}.
Best wishes,
The {{.SiteName}} Team
" diff --git a/model/config.go b/model/config.go index 640d8d51e8..cbb2547682 100644 --- a/model/config.go +++ b/model/config.go @@ -128,6 +128,7 @@ type EmailSettings struct { RequireEmailVerification bool FeedbackName string FeedbackEmail string + FeedbackOrganization *string SMTPUsername string SMTPPassword string SMTPServer string @@ -375,6 +376,11 @@ func (o *Config) SetDefaults() { *o.EmailSettings.PushNotificationContents = GENERIC_NOTIFICATION } + if o.EmailSettings.FeedbackOrganization == nil { + o.EmailSettings.FeedbackOrganization = new(string) + *o.EmailSettings.FeedbackOrganization = "" + } + if !IsSafeLink(o.SupportSettings.TermsOfServiceLink) { o.SupportSettings.TermsOfServiceLink = nil } diff --git a/templates/email_footer.html b/templates/email_footer.html index a15a2e9082..33b3d9ef6a 100644 --- a/templates/email_footer.html +++ b/templates/email_footer.html @@ -2,7 +2,7 @@

- (c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.
+ {{.Props.Organization}}
{{.Props.Footer}}

diff --git a/utils/html.go b/utils/html.go index 7bb594e073..1df336c527 100644 --- a/utils/html.go +++ b/utils/html.go @@ -86,6 +86,13 @@ func (t *HTMLTemplate) addDefaultProps() { } t.Props["Footer"] = localT("api.templates.email_footer") + + if *Cfg.EmailSettings.FeedbackOrganization != "" { + t.Props["Organization"] = localT("api.templates.email_organization") + *Cfg.EmailSettings.FeedbackOrganization + } else { + t.Props["Organization"] = "" + } + t.Html["EmailInfo"] = template.HTML(localT("api.templates.email_info", map[string]interface{}{"SupportEmail": Cfg.SupportSettings.SupportEmail, "SiteName": Cfg.TeamSettings.SiteName})) } diff --git a/webapp/components/admin_console/email_settings.jsx b/webapp/components/admin_console/email_settings.jsx index 3c30668d23..9ab943e4cf 100644 --- a/webapp/components/admin_console/email_settings.jsx +++ b/webapp/components/admin_console/email_settings.jsx @@ -25,6 +25,7 @@ export default class EmailSettings extends AdminSettings { sendEmailNotifications: props.config.EmailSettings.SendEmailNotifications, feedbackName: props.config.EmailSettings.FeedbackName, feedbackEmail: props.config.EmailSettings.FeedbackEmail, + feedbackOrganization: props.config.EmailSettings.FeedbackOrganization, smtpUsername: props.config.EmailSettings.SMTPUsername, smtpPassword: props.config.EmailSettings.SMTPPassword, smtpServer: props.config.EmailSettings.SMTPServer, @@ -38,6 +39,7 @@ export default class EmailSettings extends AdminSettings { config.EmailSettings.SendEmailNotifications = this.state.sendEmailNotifications; config.EmailSettings.FeedbackName = this.state.feedbackName; config.EmailSettings.FeedbackEmail = this.state.feedbackEmail; + config.EmailSettings.FeedbackOrganization = this.state.feedbackOrganization; config.EmailSettings.SMTPUsername = this.state.smtpUsername; config.EmailSettings.SMTPPassword = this.state.smtpPassword; config.EmailSettings.SMTPServer = this.state.smtpServer; @@ -117,6 +119,25 @@ export default class EmailSettings extends AdminSettings { onChange={this.handleChange} disabled={!this.state.sendEmailNotifications} /> + + } + placeholder={Utils.localizeMessage('admin.email.notificationOrganizationExample', 'Ex: "© ABC Corporation, 565 Knight Way, Palo Alto, California, 94305, USA"')} + helpText={ + + } + value={this.state.feedbackOrganization} + onChange={this.handleChange} + disabled={!this.state.sendEmailNotifications} + /> Setting this to true removes the Preview Mode banner (requires logging out and logging back in after setting is changed).", "admin.email.notificationsTitle": "Send Email Notifications: ", "admin.email.passwordSaltDescription": "32-character salt added to signing of password reset emails. Randomly generated on install. Click \"Re-Generate\" to create new salt.",