Error 502 Bad Gateway when sending mails using Mailer

Hello!

I’m using SMTP relay service from my Google Workspace account. I’m having some trouble sending notifications to my users, whenever I send more than 30 mails I get a 502 Bad Gateway error. Any ideas on how to solve this error? I lloked up Google’s documentation and I cannot find anything.

Thanks

This sounds to me like a delivery throttle that’s preventing too many mail outs at once. Have you taken a look in your browser developers console to see if that’s the case…?

Does it work again after leaving it for a short time…?

Yes. I thought the same. Is there in anyway I could add a wait on each iteration in the repeat action? @patrick

You could add a wait action

** NOTE ** Sorry, forgot, that’s node only

I can’t find the wait action on the php server…

NOTE I didn’t see the note at the end of the post

Hi Carlos i think this is what u need: Wait - NodeJS & PHP [Open Source]

1 Like

thanks!

Ok, the problem is not waiting between each iteration of the Send Mail action. In fact, it’s a respond delay issue, whenever I send a request and waiting response is at 1.8 min of execution it stops.

Is there any way I could iterate multiple times using the Repeat action times so that the Send Mail action restarts creating new instances of the request?

https://support.google.com/a/answer/2956491?hl=en#zippy=%2Creview-sending-limits-for-the-smtp-relay-service - please read this article.

If you’re sending your emails to external recipients (out of your Google Workspace primary domain) - I would strongly suggest you to use dedicated service for that - SendGrid or any other.

Gmail and Microsoft don’t like (and constantly monitoring) that their service are not used as an email gateways aka potential spam hubs.

I’ve read the article, I’m not even near the limits of Google Workspace.

I was using SendGrid in fact, but my Microsoft user weren’t receiving my bills notification mails because the SendGrid IP was blocked by Outlooks inbox services (Hotmail, Live, Outlook, etc) and upgrading to a higher plan wasn’t an option (my budget is low).

I’ll try alternatives…

Take a look on a Mailjet - I’m using free tier plan for my personal projects.
Works just fine.