Similarly, if I wanted to test a password reset feature, I had no easy way to pull the reset pin from the "forgot password" email.
That's why I created E2E-Mailbox, an open-source NPM package that allows you to generate disposable emails and pull their contents in test environments for free. The email services are provided by DeveloperMail and GuerrillaMail, and since these are free services susceptible to service disruption, if one provider is down, the other would be used automatically.
This way, you could guarantee the correct emails are sending to the recipients of your service, and write end to end tests that take action on the info contained in those emails.
Thank you, and any feedback would be welcomed!