How to test an email address
Test email accounts for testing email addresses in code or online. Create fake email accounts for testing.
There are many instances in which test email addresses are required: testing email campaigns; software development; and QA testing. MailSlurp is a free service for creating test email accounts that can send and receive emails from real addresses.
Create a free MailSlurp account
You can sign up for MailSlurp and then create an inbox.
The inbox has an email address that can send and receive emails.
Access the inbox in code
MailSlurp can be controlled programmatically using the REST API or SDK clients in many languages. Here is a short example in C#.
dotnet add package mailslurp
Configure an inbox in code.
var config = new Configuration(); config.ApiKey.Add("x-api-key", "your_api_key_here"); var apiInstance = new InboxControllerApi(config); var inbox = apiInstance.CreateInbox(); Assert.NotNull(inbox); Assert.Contains("@mailslurp.com", inbox.EmailAddress);
To use MailSlurp in code get a free API Key.