Failed to send email, no error message

I’ve been having issues with email not sending. There is an empty error message on the log and I see nothing in the email provider logs that a request is getting through. Even weirder, emails work for about a day if I reenter the API key and save (using the same API key), but then will suddenly stop working. I don’t really know where to go from here. Below is the error log I received from Auth0.

{
  "date": "2022-01-25T16:09:25.729Z",
  "type": "fn",
  "description": "To: ***",
  "connection": "Username-Password-Authentication",
  "connection_id": "",
  "client_id": "***",
  "details": {
    "email_type": "reset_email",
    "to": "***",
    "error": ""
  },
  "log_id": "***",
  "_id": "***",
  "isMobile": false,
  "user_agent": "Other 0.0.0 / Other 0.0.0"
}

Hi @max5

Thanks for getting in touch with us here at Auth0 Community.

I’m assuming your using a built-in email provider as this does tend to be a bit hit and miss, we defo don’t recommend using it in production scenario’s.

Personally I use a custom email provider in all my testing mailtrap.io, please review this doc on how to set up a custom email provider https://auth0.com/docs/customize/email/smtp-email-providers/configure-custom-external-smtp-email-provider.

I hope this helps you. Let me know if you have any other questions on this.
Warm regards.

3 Likes

No I’m using Mailgun

Just to clarify, there does not seem to be a problem with Mailgun. I have other sites not using Auth0 configured with the same Mailgun domain that are sending emails perfectly fine.

Hey @max5

I just wanted to check, from your Auth0 dashboard, if you navigate to Branding > Email Templates. Select a template, Verification email for example and hit the Try button. Does this send consistently? and does it produce the same message on the logs?

Regards

1 Like

Hi @SaqibHussain

Yes, the templates are sending consistently. I just checked a live site and though emails are being sent it is taking around 5 minutes to receive them. Again this does not seem to be an issue with Mailgun as my other non-Auth0 sites are sending emails consistently and are being received almost immediately.

Any ideas?

Thanks for your help!

Hey @max5

I created an account on Mailgun and tested it out on a dev tenant, I could see sign up verification emails coming through into the Mailgun logs almost immediately. I’m assuming new emails are not coming through into your Mailgun logs immediately, is this correct?

Do you have another tenant you possibly test as a troubleshooting measure?

Also are you experiencing this issue with all templates?

Regards

1 Like

Hello again @SaqibHussain

Today the email system is working perfectly. I will provide an update about the timing of the Mailgun logs if/when it starts acting up again.

I do have a dev tenant that experiences similar problems as my production tenant. In fact, a common report I get from coworkers is that emails aren’t coming through or are taking a long time to come through on our dev tenant. But again, today it’s working perfectly, so I will do more debugging once it starts acting up again.

Yes, I am experiencing the same issue with all templates.

I will update soon. Thanks!

Thanks @max5 for the update.

Let’s keep an eye on it, if it plays up again please report back your findings.

Warm regards.

1 Like

Well, it’s been three weeks and no issues. Guess this one just solves on its own. :person_shrugging:

1 Like

Alright, it’s acting up again. @SaqibHussain

Now I cannot send any email through Auth0. I am able to send email through Mailgun with no problem. There is no error message so I don’t really know where to go from here.

Here’s a recent error log:

{
  "date": "2022-03-01T21:50:12.911Z",
  "type": "fn",
  "description": "To: ***@***.com",
  "connection": "Username-Password-Authentication",
  "connection_id": "",
  "client_id": "***",
  "details": {
    "email_type": "reset_email",
    "to": "***@***.com",
    "error": ""
  },
  "log_id": "90020220301215017979260929114265082218857144823345840146",
  "_id": "90020220301215017979260929114265082218857144823345840146",
  "isMobile": false,
  "user_agent": "Other 0.0.0 / Other 0.0.0"
}

and the context data:

{
  "email_type": "reset_email",
  "to": "***@***.com",
  "error": ""
}
2 Likes