SMTP Setup documentation

SMTP Server

The following instructions are specifically intended for self-hosted enterprise LightMesh customers, who need to integrate to SMTP services for email notifications. Here, you can find the necessary information to help you get started with using SMTP for your organization. If you require further assistance, please visit our Support page.

Note: Please be aware that additional configuration steps may be required for on-premises or self-hosted SMTP servers. For detailed guidance on these configurations, please refer to the corresponding documentation.

Setting up SMTP for Your Organization

To configure the SMTP functionality in your application for your organization’s email service, follow these steps:

  1. Obtain the necessary credentials from your email service provider. You will need the following information:

    • SMTP host: The hostname or IP address of the SMTP server provided by your email service provider.
    • SMTP port: The port number for the SMTP server. This is typically 587 for TLS/STARTTLS or 465 for SSL/TLS.
    • SMTP username: The username or email address associated with your email service provider account.
    • SMTP password: The password for your email service provider account.
  2. Add the necessary environment variables to your application’s configuration. These variables should be securely stored and accessed at runtime. Consider using a .env file or a configuration management solution to manage these variables.

    • SMTP_HOST: Set this variable to the SMTP host obtained from your email service provider.
    • SMTP_PORT: Set this variable to the SMTP port number provided by your email service provider.
    • SMTP_SERVICE_PROVIDER_USER: Set this variable to the SMTP username or email address associated with your email service provider account.
    • SMTP_SERVICE_PROVIDER_PASSWORD: Set this variable to the SMTP password for your email service provider account.
    • MAIL_DOMAIN: Set this variable to the domain you want to use for the “from” address in the emails.
  3. By following these steps, you should be able to set up SMTP functionality in your application for your organization’s email service. Ensure that the environment variables are properly configured in the .env file or the appropriate environment configuration, and that you have provided the correct SMTP credentials from your email service provider. The code will automatically read the values from the environment variables and use them for SMTP configuration when sending emails.