In some product evaluation setups email is intentionally bypassed using a ByPassEmail=true
option. This option allows account creation and system operation without having to set up an email service (e.g. no email verification is required for account creation). This also means neither email notifications nor password reset by email are available.
To enable email, turn this option off by setting ByPassEmail=false
and configuring an SMTP email service as follows:
- Set up an SMTP email sending service. (If you already have credentials for a SMTP server you can skip this step.)
- Setup Amazon Simple Email Service
- From the
SMTP Settings
menu clickCreate My SMTP Credentials
- Copy the
Server Name
,Port
,SMTP Username
, andSMTP Password
- From the
Domains
menu setup and verify a new domain. It it also a good practice to enableGenerate DKIM Settings
for this domain. - Choose an email address like
[email protected]
for Mattermost to send emails from. - Test sending an email from
[email protected]
by clicking theSend a Test Email
button and verify everything appears to be working correctly.
- Modify the Mattermost configuration file config.json or config_docker.json with the SMTP information.
- If you're running Mattermost on Amazon Beanstalk you can shell into the instance with the following commands
ssh ec2-user@[domain for the docker instance]
sudo gpasswd -a ec2-user docker
- Retrieve the name of the container with
sudo docker ps
sudo docker exec -ti container_name /bin/bash
- Edit the config file
vi /config_docker.json
with the settings you captured from the step above.- See an example below and notice
ByPassEmail
has been set tofalse
"EmailSettings": { "ByPassEmail" : false, "SMTPUsername": "AKIADTOVBGERKLCBV", "SMTPPassword": "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY", "SMTPServer": "email-smtp.us-east-1.amazonaws.com:465", "UseTLS": true, "FeedbackEmail": "[email protected]", "FeedbackName": "Feedback", "ApplePushServer": "", "ApplePushCertPublic": "", "ApplePushCertPrivate": "" }
- See an example below and notice
- Restart Mattermost
- Find the process id with
ps -A
and look for the process namedplatform
- Kill the process
kill pid
- The service should restart automatically. Verify the Mattermost service is running with
ps -A
- Current logged in users will not be affected, but upon logging out or session expiration users will be required to verify their email address.
- Find the process id with