Skip to content

Configure SMTP and Email Sender

Edge Xpert uses Gmail SMTP by default.

If you wish to use another SMTP Server, update the SMTP settings on Consul http://localhost:8500/ui/dc1/kv/edgex/core/2.0/support-notifications/SMTP, and restart Edge Xpert Notifications service

edgexpert restart support-notifications

Store username/password as insecure secrets

  1. Start Edge Xpert Notifications service with Consul

    edgexpert up consul support-notifications
    
  2. Open a browser and go to Consul's GUI on http://localhost:8500/ui

  3. Navigate to the Writeable.InsecureSecrets.SMTP.Secrets page for Alerts and Notifications. This can be found at http://localhost:8500/ui/dc1/kv/edgex/core/2.0/support-notifications/Writable/InsecureSecrets/SMTP/Secrets/
  4. Set an email account (sender) to the username and the password or the app password to the password

Store username/password as secrets

  1. Start Edge Xpert Notifications service with security services

    edgexpert up --secret support-notifications
    
  2. Add secrets using REST, replace {EmailAccount} and {AppPassword} with your email and app password

    curl -X POST \
    http://localhost:59860/api/v2/secret \
    -H 'Content-Type: application/json' \
    -d '{
      "apiVersion" : "v2",
      "path" : "smtp",  
      "secretData" : [   
        {
          "key" : "username",   
          "value" : "{EmailAccount}"
        },
        {
          "key": "password", 
          "value": "{AppPassword}"
        }
      ]
    }'
    

    It should return {"apiVersion":"v2","statusCode":201}

Back to top