Netlify functions not firing emails on branch preview

Hi,

I have a function that fires when a user adds an email address and hits ‘send’. It fires the email address to the lambda endpoint https://******/.netlify/functions/login which takes the response body and passes the email address to an AWS SES email that gets sent to the email address in the response. The email contains a magic sign in link.

When I run the function locally it works perfectly but running it on build on the netlify server it doesn’t send the email the first time but the second time I send the request and from there on it’s all out of sync, so each email I get should have been the one before. I am not sure if this is a timing issue within Netlify.

Can anyone help?

Hey @mark.dunbavan, I responded to your other ticket → Netlify lambda functions not firing first time - #6 by jen and will work with you on a resolution in our helpdesk!

Hi Jen,

In the end I got it working, I will post the solution on ere after the NY.

Thanks,
Mark

1 Like

great! please do, it is always helpful for other people to see solutions and approaches!