javascriptreactjsemailtesting

How to obtain multiple Email addresses for API testing?


Before you read this question, I apologize for not being fluent in English. I hope for your understanding.

I'm a front-end developer using React, currently working on implementing the Sign-Up function. To achieve this, I need to connect to the Sign-up API and Email-verify API.

During the testing phase of these APIs, I require email addresses. However, once an email is used for testing the API, it becomes unavailable for further use as the account is already registered and verified. So, to test APIs many times, I need many email addresses.

Is there a way to obtain multiple emails for testing APIs? Can I use temporary or virtual email addresses for testing purposes?

Thank you for taking the time to read my question.


Solution

  • I assume this is thinking in the way of such..."mock/fake, generated emails"?

    If so, you have options.

    One of the biggest ones that comes to mind for me is testmail.app, you have unlimited emails (depending on your plan, but it is free for 100).

    They have a decent JSON/GraphQL API for email querying with CI/CD pipelines.

    If you want basic, generated emails, try MailHog or Mockaroo. I've used them before for other purposes of generation/testing.

    MailHog is my preferred option here. Sets up a fake SMTP server that you can locally test emails with.