Mattermost-server: Cannot get rid of Preview Mode: Email notifications have not been configured

Created on 8 Jan 2016  Â·  14Comments  Â·  Source: mattermost/mattermost-server

Even if I configured email using the console, used the testing which succesfully sent an email, it seems that I cannot get rid of the top header which tells me that "Preview Mode: Email notifications have not been configured".

I even tried to configure email inside the gitlab.rb file and did a reconfigure, but this doesn't change the header message.

Awaiting Submitter Action

Most helpful comment

You're supposed to not remove them, but replace them with env settings. Unfortunately the documentation is garbage, what's needed is:

mattermost['env'] = {
        "MM_EMAILSETTINGS_SENDEMAILNOTIFICATIONS" => "true",
        "MM_EMAILSETTINGS_SMTPSERVER" => "yourserver",
        "MM_EMAILSETTINGS_SMTPUSERNAME" => "yourname",
        "MM_EMAILSETTINGS_SMTPPASSWORD" => "yourpass",
        "MM_EMAILSETTINGS_SMTPPORT" => "587",
        "MM_EMAILSETTINGS_CONNECTIONSECURITY" => "STARTTLS",
}

All 14 comments

Hi @ssbarnea, could we have your help checking the '.config.json' file to see if the email settings have been saved there? There's a known issue in v1.3.0 where the "Save" button the email settings page may not save properly. It's fixed for v1.4

@it33 I can reproduce this using the latest master branch, the settings are saved however the banner notifying you that the server is in Preview mode does not disappear until you logout and then log-in again.

Ah, thanks @hjf288, PR submitted to update the help text and documentation to make this more clear,

@ssbarnea, please let us know if you're still having the issue after logging out and logging back in?

Hi @it33; a few hours ago I installed Mattermost 1.4 via Tutum using mattermost/platform:latest.

Went to System Console, set my email stuff up, saved. Tested, it works ok. I even invited some users (their email reached their destination).

But the "Preview" banner did not disappear. Checked config.json, _and values are empty_. :sob: Settings are not being saved, even on 1.4.

@nachokb,

But the "Preview" banner did not disappear. Checked config.json, and values are empty. :sob: Settings are not being saved, even on 1.4.

In the docker image - Mattermost uses /config_docker.json - I have just spun up a docker image and the settings are being saved in that config file.

The preview banner disappears upon logging out and logging in again.

Could you:

  • Check /config_docker.json in the container
  • Log out then in again to see whether the banner disappears?

@hjf288 thanks! Yep, it was being saved ok, I thought I had signed out (evidently not).

I know it's an old issue, but it's the first result on Google. When you are enabled Mattermost in Gitlab Omnibus installation, try to set these configs (Gmail example) in /etc/gitlab/gitlab.rb:

mattermost['email_send_email_notifications'] = true 

mattermost['email_smtp_username'] = "<YOUR_GMAIL_ADDRESS>"  
mattermost['email_smtp_password'] = "<PASSWORD>" 
mattermost['email_smtp_server'] = "smtp.gmail.com"
mattermost['email_smtp_port'] = 587
mattermost['email_connection_security'] = "STARTTLS"                                                                                                                                               

Regards,
Melroy

This happens again, after removing all the mattermost['email… settings from gitlab.rb like ordered here

You're supposed to not remove them, but replace them with env settings. Unfortunately the documentation is garbage, what's needed is:

mattermost['env'] = {
        "MM_EMAILSETTINGS_SENDEMAILNOTIFICATIONS" => "true",
        "MM_EMAILSETTINGS_SMTPSERVER" => "yourserver",
        "MM_EMAILSETTINGS_SMTPUSERNAME" => "yourname",
        "MM_EMAILSETTINGS_SMTPPASSWORD" => "yourpass",
        "MM_EMAILSETTINGS_SMTPPORT" => "587",
        "MM_EMAILSETTINGS_CONNECTIONSECURITY" => "STARTTLS",
}

After GitLab 11 Upgrade, this is not an issue for me anymore.

Hi @ssbarnea would you like to turn off email notifications for your entire server or just for yourself?

In Account Settings > Notifications > Email Notifications you can disable email notifications for your personal account even if they are enabled for the server. In order to remove the banner, email notifications have to be enabled for the server via the System Console > Notifications > Email.

Getting the blue bar with "Preview Mode: Email notifications have not been configured" too in Mattermost 4.1.x and 4.2.0.
Account Settings -> Notifications -> Email notifications shows "Email notifications are not enabled".
Clicking the "Edit" link shows "Email notifications have not been enabled by your System Administrator."
That's fine. I don't want e-mail notifications.

Please... just remove this annoying blue message or make it configurable. I don't care about the fact that email notifications have not been configured.

:(

Hi @Bart76 - we do have a setting for this now: https://docs.mattermost.com/administration/config-settings.html#enable-preview-mode-banner

Hope that helps!

Was this page helpful?
0 / 5 - 0 ratings