Forum Discussion

MrX's avatar
MrX
New Contributor
6 years ago

How to search specific email in hundreds of email recipient mailbox.

Hi, I have an automation task to validate if the email was received by the expected recipient as well as to validate the email has not received by other email recipients in the test environment.  Application process batch of policy renewal intimation and sent email to hundreds of email recipients. Can anyone guide me about how can achieve the requirement using Testecomplete.

Thanks in advance.

6 Replies

  • jhanzeb1's avatar
    jhanzeb1
    Frequent Contributor

    What tool are you using to achieve this? 

     

    Anyways, the flow would be -

    Do you have a test step to send an email to the recipient mailbox? I'm hoping that you, what you need to do it, run that step first to send the email, then create a step to login or view recipient's mailbox. Once in the mailbox, you can have a groovy script to search and match sent email subject against the subject in mailbox. 

     

    This can be achieved on SoapUI.

     

    • MrX's avatar
      MrX
      New Contributor

      An application has sent the emails we don't need to worry about it. I need to validate that by accessing the number of mailboxes say around 100+. So should verify that on the mail server? or any other way?

      I need to provide the solution using a TestComplete tool. 

      • jhanzeb1's avatar
        jhanzeb1
        Frequent Contributor

        Sorry I've not used TestComplete, though I've done a similar journey in SoapUI. 

         

        The flow I used was - Login to the recipient's email (REST Request), once logged in, use the sessionID in the next request to access the user's mailbox and get all emails. Store all emails in a variable, from that variable search for the specific email and have if/else statement, if found --> goTo report props and update, else fail the test. 

         

        I hope it helps you.