Home
Support Forums

sendingBlue working in local but not in production

Dear all,

I have a problem with a serverless function. I’m building a mailing system with Sendinblue, which works perfectly on local but not in production.

I’m passing an object with data dinamically to sendTransacEmail function. In local everything works perfectly, but in production, despite building the object correctly I don’t get any response.

I checked the env variables and they work fine.

sendSmtpEmail.sender = { "name": "Sender Name", "email": "hello@example.com" };
sendSmtpEmail.to = [{ "email": email, "name": name }];
sendSmtpEmail.htmlContent = htmlContent;

try {
    const result  = await apiInstance.sendTransacEmail(sendSmtpEmail);
    console.log('API called successfully. Returned data: ' + JSON.stringify(result));
    
  } catch (error) {     
    console.error('Error calling apiInstance.sendTransacEmail: ', error);
  }

Hi @guisopo,

I’m using Sendinblue in one of my functions like this:

Could you give that a try?