Verification-email jobs often remain pending

My application uses the Auth0 Management API to resend verification emails:
POST /api/v2/jobs/verification-email

Sometimes the jobs complete quickly but often the jobs remain in pending status which causes user confusion and increased support issues. The Auth0 application is configured to use a custom email provider (Mailgun).

Is there anything that can be done to make the jobs more reliable?

Hi @jrd,

Welcome to the Auth0 Community!

I understand that you have been encountering delays with sending the Verification Emails to your users.

Generally, when making a Verification Email Job using the Management API, it redirects the request to your custom email provider to assume the responsibility to send the verification email.

In this case, there could be something happening behind the scenes in Mailgun’s servers.

I would recommend that you please check Mailgun’s logs to see the behavior of the emails.

Please let me know your findings.

Thank you.

hey @rueben.tiow, thanks for replying! I had checked the Mailgun logs prior to posting this question. I can confirm Auth0 is not reliably submitting an email to Mailgun.

Here’s more context:

  1. My application would create a verification email job by POSTing to /api/v2/jobs/verification-email
  2. The response includes the job id
  3. Every 30 seconds for ~30 minutes my application would GET /api/v2/jobs/{job id} … each time the job returned “pending” status.

My understanding is when Auth0 invokes the mailgun API to send the email the job would change to “completed” status and I would see the API call in the mailgun logs. It looks like neither are happening reliably.

Hi @jrd,

Thank you for your response and clarification.

It seems like maybe something is happening behind the scene that is contributing to the intermittent email delivery delays.

In this scenario, could you please try registering couple of new user and see if they receive the verification email?

Thank you.