Cannot send mail using Nodemailer and Gmail Oauth2 Account Settings

I have written code to accept data from a contact form and send mail using the package nodemailer and through a Oauth2 verified gmail account using the package googleapis. The code works perfectly fine on my local machine, on which I am running the netlify functions using netlify-lamda.

But when I push this on actual netlify site, the functions are getting created , but the actual mail code is not getting executed at all. What may the issue, do you have to make specific settings or write code to make it run in production on netlify functions.

What happens when you try, @ctrljs ? “actual mail code is not getting executed at all” sounds like you’ve done some debugging - are your functions getting executed or no? are you using an event-triggered function, and if so, what do you call it? Mind linking us to your site directly so we can look in place?