Rayrun
← Back to Discord Forum

How to verify a newly created user via email , a link is clicked in order to verify the user

I am creating a new user and in order to verify the user I need to log into that email and click on a link , what are the best practices to do this? I am was researching and found some services but they are not the right approach I think.

This thread is trying to answer question "How to verify a newly created user via email by clicking a link?"

12 replies

Does your automation need to cover the fact that the email is received, or do you just need access to the link in order to proceed with the test? If it's the latter, is there an API endpoint that can provide you with the link?

If so, you could get the link via the API in your test and navigate to it in your browser context which would simulate the user having clicked it from their email.

However if you actually need to test that the email arrives, I'm afraid that's not something I've tried before but hopefully someone else in the community can advise 🤞

Hi Sashaknits,

I need to press a link inside the email to verify the user, that is my scenario

Hey @.aowek , how did you ended testing this? I need the same, enter to an email sent

We do this by having our outbound emails sent to the localhost:port of a mailhog installation, which in our case, is a docker container that sites alongside our software under test. So when I have created a new user, the email is routed to mailhog which I can then either open in a browser, find the email and do what I need to with it (click on a link etc), or I believe it also has an api to interact with (not tried that yet).

I can't give you details on how it is all setup, as I don't hold that information. But that is what we essentially do here to solve that problem. https://github.com/mailhog/MailHog

Nice will have a look! I am trying to do it with mailinator now. I think it's also good solution. Thanks!

https://inbucket.org/ and https://github.com/axllent/mailpit webmail for email testing easy to use

bandito9274
bandito9274

Another great online tool for virtual email box https://webhook.site/

Nice to see other suggestions for this. Will book mark those last two for potential later use elsewhere 🙂

Inbucket is absolutely solid for this. We’ve been using it for over a year. 1 instance can easily service multiple envs and over 30+ QAs.

Mailpit newest and have richer functionality

bandito9274
bandito9274

webhook site is also open source and can be installed as docker image https://docs.webhook.site/open-source.html

I will try to implement some of this solutions

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.