Users will learn how to configure the UniFi Controller to send email using a free Gmail account and the Gmail Simple Mail Transfer Protocol (SMTP) Server when no other suitable SMTP server is available and UniFi Cloud will not be used.
The UniFi Controller relies on email to serve Forgot Password requests, invite administrators, and communicate device alerts.
If UniFi Cloud Access is enabled, the controller will automatically make use of the cloud services to send admin invitations (only). This will happen when "Enable Cloud Access" or "Invite to SDN" is checked on the admin invite itself. You still need to configure the SMTP settings for the controller to send most email messages (local account recovery and email alerts), and also to send admin invites without choosing "Enable Cloud Access" or "Invite to SDN".
If UniFi Cloud Access will not be enabled, it is important that a SMTP server be configured to facilitate email delivery - especially for Forgot Password requests, but also for email alerts and admin invites.
Note: Gmail is used for this work instruction, but other mail service providers can be used as long as the SMTP, port and username/password is known.
Note: Google may block sign-in attempts from some apps or devices, in which case you would receive an email stating that a sign-in attempt was blocked, mentioning devices that do not use modern security standards. Follow this work instruction to fix this issue.
Table of Contents
Create a new Gmail Account, or use an existing one. Keep in mind emails sent by the UniFi Controller will appear to come from this email account.
Take note of the account credentials (email address and password).
You may also use a Google Apps account, as long as the Google Apps Domain Administrator has not disabled SMTP support. For more information on Google Apps SMTP Support, see https://support.google.com/a/answer/176600?hl=en
As stated in this google support page, if you use 2-Step-Verification you might need to create an App password instead of using your regular Google password before being able to configure the SMTP settings for the controller.
In the UniFi Controller, navigate to Settings -> Controller and check “Enable mail server”.
Configure the Mail Server section as follows:
Enable SSL: Checked
Enable authentication: Checked
Username: Enter the full Gmail email address from Step 1 (including @gmail.com or @your_domain.com)
Password: Enter the account password from Step 1
Specify sender address: Unchecked
Enter a valid email address that you have access to in the text box labelled “Send test email to” and click Send. You should see a success message at the top-right corner of the browser screen, and within a few minutes you should receive a test email confirming the email was sent successfully.
Note: If the UniFi Controller shows a Success message when sending the test email, but the test email is not found in the target account's Inbox, be sure to check the All, Spam and Junk folders.