S
Supabase•2mo ago
sumit

why verification mail, forgot password mails are taking too long to reach to users sometimes?

when users are creating account, the verification emails from supabase is taking too much time to reach to users (approx. 5-6 min). Where as sometimes it coming quick like usual it should be, sane thing happening with forgot password too. Please help asap, the problem is encountered on both live site and local host .
50 Replies
sumit
sumitOP•2mo ago
and sometimes its saying email rate limit exceeded.
ihm40
ihm40•2mo ago
have you enabled a custom smtp or are you using supabase for sending this emails?
sumit
sumitOP•2mo ago
yes custom smtp is enabled
ihm40
ihm40•2mo ago
you might have to reach out to you smtp provider then to see if there are any issues which smtp are you using? Do they provide details themselves of logs or when emails are sent?
sumit
sumitOP•2mo ago
sendgrid
inder
inder•2mo ago
rate limit is enabled by default to protect your SMTP from abuse You can change the limits from your supabase dashboard
sumit
sumitOP•2mo ago
actually this is a client project i am working on, and he said to use sendgrid, and he sent me an api key to use please guide, from where i can fix this issue
ihm40
ihm40•2mo ago
i think the API key is only for use in edge functions, you would need access to Auth -> emails -> smtp settings to investigate login related issues
inder
inder•2mo ago
https://supabase.com/dashboard/project/_/auth/rate-limits Check your project's logs, if the log entry shows that the email was sent then its an issue with your smtp
sumit
sumitOP•2mo ago
and from where i can see the logs?
inder
inder•2mo ago
For example, this is for magic-link
No description
sumit
sumitOP•2mo ago
No description
inder
inder•2mo ago
You need to check with your SMTP. everything is fine here Also you can test with the supabase's inbuilt SMTP for testing one or two emails
sumit
sumitOP•2mo ago
like the smtp was just enabled few days back, but this issue was from starting
inder
inder•2mo ago
even with inbuilt smtp? a minute or 2 delay is normal
sumit
sumitOP•2mo ago
it was like 5-6 min approx
inder
inder•2mo ago
?
sumit
sumitOP•2mo ago
yupp
inder
inder•2mo ago
thats strange. I just tried with inbuilt one and got an email within a minute Try sending email from dashboard to your email address with the inbuilt one
sumit
sumitOP•2mo ago
direct link plz
inder
inder•2mo ago
https://supabase.com/dashboard/project/_/auth/users Select the email and a side menu on the right side will open. There you'll find an option to either send magic-link or reset-pass
sumit
sumitOP•2mo ago
No description
inder
inder•2mo ago
It's email rate limit exceeded msg
sumit
sumitOP•2mo ago
so this rate limit is supabase thing? and delay emails are from sendgrid?
inder
inder•2mo ago
correct This is where you adjust these rate-limits
sumit
sumitOP•2mo ago
okay thankyou, boss. Now i need to guide that dumb client, that his sendgrid thing is causing the issue not supabase
inder
inder•2mo ago
Did you try sending emails with inbuilt smtp? There is a rate limit on the inbuilt one that is not customizable But its fine for testing 1 or 2 emails
sumit
sumitOP•2mo ago
so like this is a production level site, ao how can we deal with that?
inder
inder•2mo ago
You can't. custom smtp is the way to go You can try brevo or resend. resend has a free plan. not sure about brevo. You can use that to guide your client that its an issue with sendgrid
sumit
sumitOP•2mo ago
okay thankyou, i will
inder
inder•2mo ago
brevo too has a free plan
sumit
sumitOP•2mo ago
no he just want to use sendgrid, dont know why
inder
inder•2mo ago
Just for demo purposes, you can use the inbuilt one or set up a free account on either resend or brevo and use that. On resend, until you verify your domain with them you can't send any emails to addresses other than your own email. keep that in mind. don't know about brevo.
sumit
sumitOP•2mo ago
this site is going to launch tomorrow, so we don't have time to test or demo thing, we have to fix it from what we are using
inder
inder•2mo ago
What I meant was to show your client that its your sendgrid smtp which is causing issues and they will need to use some other SMTP
sumit
sumitOP•2mo ago
so you are saying that it cant be fixed from sendgrid side too?? ther email delay thing
inder
inder•2mo ago
I've never used sendgrid but no email provider voluntarily delays sending emails. Maybe too much load on their systems scheduling emails is a different thing
sumit
sumitOP•2mo ago
okay lets see, whats happening on sendgrid side, i have also never used that, just working with api key only, let me get the developer access of sendgrid from them and hope that this thing get fixed
inder
inder•2mo ago
If the client is fussy, you're gonna have to show a demo with another provider otherwise its your fault
sumit
sumitOP•2mo ago
okay i will keep your alternatives suggestion in mind, lets hope its not 🥲 i mean if the problem is from code, then every email should get delayed, why some of them are getting delayed
inder
inder•2mo ago
do you see the same delay when sending mail from dashboard?
sumit
sumitOP•2mo ago
no, from dashboard it was only limiting, from sending it too frequently
inder
inder•2mo ago
You can change the limits and retry Do you know how to setup a server?
sumit
sumitOP•2mo ago
i have only developer access, and to edit or chnage those it require admin access
inder
inder•2mo ago
There is open source test smtp server mailpit which can be used to receive emails
sumit
sumitOP•2mo ago
i am an intern here, and got my degree this year only, dont expect much from me🥲 like nodemailer ?
inder
inder•2mo ago
nodemailer is a client which sends emails. mailpit is a smtp server which receives those emails but instead of forwarding to the email address it stores emails https://www.youtube.com/watch?v=PJo5yOtu7o8
sumit
sumitOP•2mo ago
inder bhai you are too helpful yaar, india? me Up (lucknow) i have to inform the client about this smtp (sendgrid ) issue, let see what he says, and then i will get back to you thankyou for your valuable time, for teaching me. 🫡 really appreciate your patience
inder
inder•2mo ago
no worries

Did you find this page helpful?