Configure SMTP for outbound emails

Google Cloud Platform doesn’t allow SMTP traffic through default ports: 25, 465, 587. Check Google cloud documentation to learn how to use a VPN to bypass these restrictions or use a different port for sending emails from your application.

Custom SMTP account or Gmail

Follow these steps:

  • Log in to the server console.

  • Navigate to the /opt/bitnami/apps/edx/conf directory.

  • Edit the files lms.env.json and cms.env.json and modify the lines below. For example, for a Gmail account, use the settings below. Replace USERNAME with your Gmail account username.

    "EMAIL_HOST": "",
    "EMAIL_PORT": 587,
    "EMAIL_USE_TLS": true,
  • Add the credentials to the lms.auth.json and cms.auth.json files. Replace USERNAME and PASSWORD with your Gmail account username and password respectively.

    "EMAIL_HOST": "",
    "EMAIL_PORT": 587,
    "EMAIL_USE_TLS": true,
    "EMAIL_HOST_USER": "",
  • Restart the Apache server to load the changes.

To configure the application to use other third-party SMTP services for outgoing email, such as SendGrid, refer to the FAQ.

NOTE: If you are using Gmail as the outbound email server and have experienced issues trying to send emails correctly, check the Gmail SMTP troubleshooting page to learn the causes of these issues and how to solve them.

Last modification January 18, 2019