The SMTP request for a one.com domain email is experiencing issues when sent from the render.com server

I have set up an Express JS server on render.com to handle SMTP calls to an email service hosted on one.com with a custom domain. Utilizing nodemailer to manage the SMTP call:

app.post("/send-mail", validate(schema), (req, res) => {
  console.log("sending email...");
  let transporter = nodemailer.createTransport({
    host: process.env.REACT_APP_HOST,
    port: process.env.PORT,
    auth: {
      user: process.env.REACT_APP_EMAIL_LOGIN,
      pass: process.env.REACT_APP_EMAIL_PASS,
    },
  });

The setup works smoothly when running the Express JS server locally, as I receive the test email successfully. However, encountering a timeout error when trying to do the same from Render.com:

Error: Connection timeout
    at SMTPConnection._formatError (/opt/render/project/src/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)
    at SMTPConnection._onError (/opt/render/project/src/node_modules/nodemailer/lib/smtp-connection/index.js:776:20)
    at Timeout.<anonymous> (/opt/render/project/src/node_modules/nodemailer/lib/smtp-connection/index.js:235:22)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7) {
  code: 'ETIMEDOUT',
  command: 'CONN'
}

Unclear about the root cause. Should I consider transferring the domain to another provider or is Render.com posing the issue?

Running the Express JS server on Render.com, expected the SMTP call to be successful like localhost. Despite matching settings, experiencing different outcomes.

Answer №1

After some troubleshooting, I decided to switch over to sendgrid.com as my SMTP provider instead of nodemailer, and that decision proved to be the solution to my issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Encountering the error message ERR_CONNECTION_TIMED_OUT while using Vue CLI

Currently, I am venturing into the world of Vuex and attempting to incorporate some API requests using this state management pattern. Here is the structure I have set up: Component.Vue export default { created() { this.$store.dispatch('getDat ...

A div containing a form, with the form being visually integrated within the div

Hi everyone, this is my first post here and I've tried to search extensively before asking this question. I've attempted to use the following examples without success: jquery submit form and then show results in an existing div Form submit ...

Jest and Enzyme failing to trigger `onload` callback for an image

I'm having trouble testing the onload function of an instance of the ImageLoader class component. The ImageLoader works fine, but my tests won't run properly. Here's an example of the class component: export default class ImageLoader extend ...

I am trying to figure out how to properly utilize server-only functions within Next.js middleware

In my current project, I am utilizing Next.js 13 along with the App Router feature. While attempting to include a server-specific fetch function in middleware.js, an error message is encountered: Error: Unable to import this module from a Client Compone ...

Error caused by live data dynamic update on Highstock chart: Cannot access property 'info' of undefined

Utilizing Laravel, I was able to create Highcharts by consuming data from a Rest API link (Spring app) at . The data is currently displayed statically, but I want to dynamically visualize it on charts. I attempted to follow this example on Fiddle and inte ...

Attempting to retrieve data either by code or with a WHERE condition proves unsuccessful as the data retrieval process yields no results

Seeking assistance with my Angular project that is utilizing a Node.js server and MSSQL express. I am having trouble retrieving data using a WHERE condition in my code. Any help in identifying the missing piece or error would be appreciated. Thank you. // ...

Is it possible to create a table using a loop in an SQLite query?

Welcome In the company where I work, Excel is currently being used to manage a large database of items for cost estimation purposes. To simplify this process, I am developing an Electron App that will replace Excel with a more user-friendly interface and ...

Acquiring numerous query string parameters in Express 4

const express = require('express'); const bodyParser = require('body-parser'); const app = express(); const url = require('url'); // middleware to parse application/x-www-form-urlencoded app.use(bodyParser.urlencoded({ extend ...

Utilizing Angular to augment existing items in local storage

Hey everyone, I'm facing an issue with localStorage that I can't seem to figure out. I have a form where the first step collects name and gender, and the second step asks for weight and height. The data from step 1 is saved in localStorage, but ...

Using Bookshelf, Knex, and MySQL to store information about a collection of items

I'm facing a dilemma when it comes to using the Bookshelf model to insert data into the database in this particular scenario: The libraries I am working with include knex, bookshelf, express, body-parser, and a MySQL database In my database, there i ...

I encounter the error message "Class extends value undefined is not a constructor or null" in sveltekit when attempting to import a function from npm modules that I previously exported

I am struggling to send emails using SvelteKit and the "nodemailer" npm module. However, when I try to import the function, I encounter an error: "Class extends value undefined is not a constructor or null" Here is the code snippet from my mail.js file: i ...

Adding a custom class to a select2 dropdown: How can it be done?

I have customized select2 using CSS with its general classes and IDs. Currently, I am attempting to customize a specific class that will be assigned to select2 and then applied in the CSS. The problem lies not within the select itself, but within its dro ...

AngularJS - Import and save CSV files

I have set up a nodeJS program as the server and an AngularJS web application as the client. For generating CSV files, I am utilizing the "express-csv" library (https://www.npmjs.com/package/express-csv) Below is the code for the server side: Definition ...

Discover the key technique to modify the status of a different component in React

I'm working on developing a popup window component. Here is the initial code for the popup component: The component takes in two props, activity (which can be set to true or false) and content (a view component that will be displayed inside the popu ...

A guide to activating tag selection within the DevExtreme tag box

I'm currently utilizing devExtereme within my Angular project. My goal is to enable the selection of text within tags in my tagbox component. Here's what I have implemented: <dx-tag-box [dataSource]="sourves" [value]="value&quo ...

I'm puzzled as to why, but my code seems to be causing an issue with the command prompt, possibly due

Recently, I've been taking on the challenges of Advent of Code. Day 2 has me stumped, as there's a peculiar issue with the code when running it through node.js in the command prompt: const fs = require("fs"); var valid = fs.readFileSync("inpu ...

What is the best way to identify and recover two separate client socket connections from the same user after a server restart?

Picture this scenario: A customer opens a browser tab and goes to page-x. As the customer remains on this page, I send out data through a socket specific to this page, which we'll call socket-context-x. Next, the customer opens another browser tab ( ...

Tips for updating VUE's main.js file to incorporate the routers/index.js configuration

What is the reason for the difference in syntax between the VUE UI main.js code generated by CLI/3 and the older version, and how does it function? What are the various components of the new syntax and how do they work? sync(store, router) // for vuex-rou ...

What is the functionality of an Angular service that retrieves an

It appears that Angularjs services are constructed by passing in a Contructor function: app.service('serviceName', function(){ this.var1 = 'foo'; this.method1 = function(){ } }); Angular executes this function using the new ...

Steps to validate individual input text fields that create a date and display an error message if the date is not valid

Currently, I am working on a React Material UI component designed to capture a user's 'Date of Birth'. This component consists of three separate inputs for the day, month, and year. In order to enhance this functionality, I would like to im ...