Videos
Check out our tutorial video series.
How to create real email addresses using GraphQL to send and receive emails in tests and frontend applications.
Did you know you can use GraphQL to send and receive emails? That's right - there is a free API at graphql.mailslurp.com you can use to create disposable email accounts for testing and application development.
Use NPM to initialize a new node project and add the AVA test library (you can use any test library you wish).
Then add the library so we can call the GraphQL endpoints.
Our package json now looks something like this:
To use ESM style imports add the flag to your package.
Create an file and add the code below:
Now we have a client let us write some tests to demonstrate usage of email accounts. Create a file and add a test.
If we run we will see passing tests in your console output.
Given that the dummy tests are passing we can add queries to our test to create a disposable email account, send and email to it and receive said email.
Create a new disposable email account using MailSlurp's mutation. Use a custom domain for permanent inboxes.
Check out our tutorial video series.
Email and SMS guides for automation and testing.
View github project code for multiple languages.
Latest posts from the MailSlurp team.
Test, build, and automate messaging with a free MailSlurp account.