0. Prerequisites
Enable 2-Step Verification for your Google account if you haven't already.
1. Create an app password
Create an App Password:
- Go to your Google Account settings
- Select "Security"
- Under "Signing in to Google," select "App Passwords"
- Generate a new app password for EMQX-Guard-Pro
2. Copy Gmail SMTP configuration
3. Load the configuration
./bin/emqx ctl guard load ./smtp.conf
loaded smtp ok
4. Test the notification
./bin/emqx ctl guard test
5. Common issues
If you don't receive the test message and find no errors in the EMQX log, verify:
user
and from_email
are full Gmail addresses (@gmail.com)
password
is the generated app password
skip_verify = true
host = "smtp.gmail.com:465"
(not port 587)
6. Reference