0

Is there any problem with Firebase authentication? I am not receiving any email (verification or reset) from yesterday.
I can't even send reset email from console manually
I have checked spam folder also.
Here is my code

FirebaseAuth.getInstance().sendPasswordResetEmail(email)
                    .addOnSuccessListener(unused -> {
                        //is called
                    })
                    .addOnFailureListener(e -> {
                    });

Above code worked before, but recently I am facing this issue. I have tried to send reset password to an email through firebase authentication manually, but it's not working even.

More info:
If I add user manually and send email, it shows email sent successfully. But I don't receive any mail.

Abu Saeed
  • 1,020
  • 8
  • 21
  • Have you tried to log the error message that exists inside the `e` object, to see if something went wrong? – Alex Mamo Nov 02 '22 at 07:45
  • `addOnSuccessListener` is being called. Besides, I can't send mail through `console` manually – Abu Saeed Nov 02 '22 at 08:29
  • So if the `onSuccess` fires. then what is the issue? – Alex Mamo Nov 02 '22 at 08:36
  • I am not receiving any mail. – Abu Saeed Nov 02 '22 at 08:36
  • You should wait a few moments after you perform the operation. Always make sure you are checking the right email, meaning the email in the `.sendPasswordResetEmail(email)` is the same as the one you're verifying in the browser. Take a look again at the spam folder, it may accidentally arrive there a bit late. – Alex Mamo Nov 02 '22 at 08:38
  • No mail in spam folder. I have checked this and also mentioned in question. Suppose my code is wrong, But I can't even send through console in browser. – Abu Saeed Nov 02 '22 at 08:39

1 Answers1

0

If the API call succeeds, the email was sent successfully. If it doesn't show up where you expect it, it got lost along the way - typically in a spam filter or a spam folder.

Spam filters are common on large company infrastructure. To check whether the message got caught in such a spam filter, you'll have to check with any IT team that owns part of the delivery infrastructure along the way.

An easier way to check might be to send to a public mail provider, such as Gmail. If the message shows up in the spam folder there, you know your code is working correctly. To prevent it getting caught as spam, have a look at my answer here: Why did this code fail to send password reset link in firebase?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • But I am not getting email in spam also. Beside I have tried with a temporary mail(`@nezid.com` and `@dmtubes.com`), it doesn't even work there also – Abu Saeed Nov 02 '22 at 15:30
  • Not even getting mail with `@yandex.com` and `@yahoo.com`. – Abu Saeed Nov 02 '22 at 15:41
  • Unfortunately there's not much more we can do to troubleshoot here: if the API call succeeds, an email was sent to the address you indicated. If it doesn't show up, it got lost somewhere along the way - but we can't say where that is beyond the options I listed in my answer. – Frank van Puffelen Nov 02 '22 at 15:51
  • Thanks. It was working before. I think from yesterday, I am getting this issue. Where can I contact for solving this issue? – Abu Saeed Nov 02 '22 at 15:53
  • You can [reach out to Firebase support](https://firebase.google.com/support/contact/troubleshooting/) for personalized help in troubleshooting, but (unless there's an issue that I'm not aware off) I expect them to tell you the same as I did here. – Frank van Puffelen Nov 02 '22 at 16:50
  • How do I solve then? Is there anything you would suggest me to follow that might help – Abu Saeed Nov 02 '22 at 18:54
  • I think I have found the issue not solution. https://stackoverflow.com/questions/74330072/firebase-authentication-email-is-not-being-sent-in-default-action-url – Abu Saeed Nov 05 '22 at 17:43