Issue with Sending Emails on Render Server

dear render community,
I hope this message finds you well. My name is Ismail Umar, and I am currently experiencing an issue with sending emails on the Render server.

Problem Overview: While I can successfully send emails using my local server, I’m encountering difficulties when attempting to do the same on the Render server. I have already signed up with SendGrid and successfully sent emails through their service. However, when deploying my application on Render, I don’t receive any response, and the email sending functionality seems unresponsive.


  • I am using node.js.
  • I have signed up with SendGrid and verified that my SendGrid account is working correctly.
  • The email sending functionality works as expected on my local server but not on the Render server.

Actions Taken:

  1. I have reviewed the deployment logs on Render, and there are no apparent errors during the deployment process.
  2. Dependencies, including the ‘sendgrid/mail’ module, are correctly installed on the Render server.
  3. Environment variables, including the SendGrid API key, are properly configured on the Render server.
  4. The network connectivity of the Render server appears to be intact.

Request for Assistance: I kindly request assistance from the Render community to help troubleshoot and resolve this issue. If anyone has encountered a similar problem or has insights into potential solutions, I would greatly appreciate your guidance.

Thank you in advance for your time and support. I look forward to your insights and suggestions.

[Updated Dec 10, 2023]: I have resolved this. Turn out in the Secret files in Env Groups, I have a space between the variable and the value. So previously it was:


I fix it by removing the space before ‘=’:


The thing is I have been using this exact file in localhost and Digital Ocean App Platform, and it works just fine. But Render doesn’t seam to tolerate the space and doesn’t raise any error either.

Feedback to the Render team, I think you guys should learn from Digital Ocean App Platform on how to bulk import env variables. They allow user to copy & paste the .env file into their UI, and automatically parse & display a list of environment variables for users to verify & edit. Very clear & no hidden error.

[Old post]
I have similar problem. Mailgun works fine on Heroku, but doesn’t work on Render & throw error 404 Forbidden. Same API key & settings on both Heroku & Render.

raise AnymailRequestsAPIError(

anymail.exceptions.AnymailRequestsAPIError: Mailgun API response 401 (Unauthorized): 'Forbidden'

Hey Ismail,

I see that you’ve already initiated a support ticket with us. To avoid any confusion or duplicate efforts, let’s continue the conversation there

Render Support, UTC+3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.