6

Is there any disposable email service that allows receiving verification emails at a temporary address that self-destructs after 24 hours so that it will be helpful in automation of 'customer registration and verification' test case?

3
  • 3
    Are you testing locally ? why not set up a local mail server for internal use ? – Rsf Jun 9 '20 at 12:47
  • 1
    One caveat, some third-party service providers disallow the use of disposable email providers. Apple is one example. – barbecue Jun 9 '20 at 15:16
  • Also, it's usually best to wait a day or so before accepting an answer, as that gives people from other parts of the world a chance to see your question. – barbecue Jun 9 '20 at 15:16
7

Yes in the current scenario we have so many disposable email service providers available in the market. they provide the free public and private inbox for a temporary email address. recently I found some very good disposable email service providers and one of them is https://mail7.io.

import org.apcahe.commons.lang3.RandomStringUtils;

public class mail7{

    private static final String EMAIL-DOMAIN = ‘mail.io’;
    private static final String EMAIL_APIKEY = ‘mail7_api_key’;
    private static final String EMAIL_APISecret = ‘mail7_api_secret’;
    private String emailid;
    
    public usernameGenerator(){
    
    String username = RandomStringUtils.randomAlphanumeric(8).toLowerCase();
    System.out. println(“Random Username is ” + username);
    return username;
}

public getInbox(String username){

    HttpResponse <String> httpResponse = Unirest.get(“"https://api.mail7.io/inbox?apikey=" + EMAIL_APIKEY + "&apisecret=" + EMAIL_APISecret + "&to=" + username”)
.asString();
    System.out.println( httpResponse.getHeaders().get("Content-Type"));
    System.out.println(httpResponse.getBody());
    return httpResponse.getBody();
}

Please refer to this doc: Registration and Login automation using selenium with a disposable email to get a better idea and solution for your problem.

6

With Gmail the sender can add a + and any combination of words or numbers after your email address and you'll still receive the email.

if your [address is] hikingfan@gmail.com, you could send mail to hikingfan+friends@gmail.com or hikingfan+mailinglists@gmail.com.

So you can potentially get by with only a single Gmail email address and you can check the recipient of received emails to see which test it corresponds to.

Of course Gmail has an API with which you can programmatically receive emails, if required (or you can potentially use regular POP).

It appears you can also set up a filter to automatically delete old emails.

If you don't want to use Gmail: While other providers might not support the exact same functionality, they may support something similar. I would start by checking whether something like this exists with whichever provider your company is using as their primary email provider or if a rule could be set up to achieve something like this.


The other option, as mentioned in the comments, would be to set up a local mail server on whichever machine the test is run or have a test mail server that's either permanently running on your local network or that's created as part of the test process.

Minimising or avoiding external dependencies in tests is always a good thing to strive towards. You don't want your tests to fail or to be unable to test if some external service has downtime. Or they could make a change that breaks your tests. There's also always the risk of confidential or private data accidentally ending up in a test. If you're sending that data to some untrusted third party, that could be quite a problem (even if they pinky promise to keep your data secure and delete it after 24 hours).

1
  • on gmail . in the before the @ are ignored (common scam with subscribe account). So my.name@gmail.com is the same as myname@gmail.com, m.yname@gmail.com and so on – Jungkook Jun 10 '20 at 12:56
2

Following options are quite good too. Have been using them for quite some time:

  1. Mailinator.com

  2. Guerrilla Mail

  3. Mailsac

  4. Mailtrap

For creating mailboxes during manual testing, we use mailinator whereas in automation tests, if there is email communication involved and we have to read certain email content as part of tests (as is the case with you), we use guerrillmail. In our case, we have to read verification codes sent in emails and on some occasions, we have to validate certain links sent in emails.

1

For manual testing, I've used 10 Minute Mail, which (like the name says), self-destructs the email address after 10 minutes.

Depending on how you're automating the signup process, it may not work for your case but the option is there if you need it.

0

If the service is free, you pay with your data.

For any professional purpose, you should seriously think about what kind of mail service provider you are using, and what kind of contract you have with them.

  • Running your own mail server is an option, but it leaves your admin staff to run something they're not specialized in.
  • Alternatively, outsource that task to an external provider. Someone with a Service Level Agreement.
0

There are many, just search in google using "temporary email id" fews are below:

https://temp-mail.org/en/ https://tempail.com/en/

0

I recently learned about yopmail. We used it for manual testing. You can use [any_name_you_want]@yopmail.com, e.g me@yopmail.com or michael@yopmail.com

It will display any messages sent to that address publically and from anyone who uses the email address so expect to see other peoples work for commonly used emails. An example is shown below with a common address (junk@yopmail.com) used by many.

enter image description here

Whereas noone else has currently used michaeldurrant

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.