How to Automatically Send an Email Report After Each Test Suite Execution in Katalon Studio?

Hi everyone,

I’m trying to automatically send an email report after every Test Suite execution in Katalon Studio.

My requirement:

  • After a Test Suite finishes (Pass or Fail), an email should be sent automatically.
  • The email should be sent to specific recipients (company email addresses).
  • I want to attach the generated HTML/PDF report to the email.
  • This should happen without any manual intervention.

I have a few questions:

  1. What is the recommended way to implement this in Katalon Studio?
  2. Should I use a Test Listener (@AfterTestSuite) or another approach?
  3. Is there any built-in feature for email reporting, or do I need to use JavaMail/Jakarta Mail?
  4. If my company uses Microsoft 365 (Outlook) or Gmail with authentication, what is the best way to configure SMTP?
  5. Does anyone have a working example or GitHub repository that demonstrates this?

I’m looking for a reliable solution that works for local execution as well as CI/CD pipelines (Jenkins, GitHub Actions, etc.).

Any suggestions or sample code would be greatly appreciated.

Thank you!

Have you checked the official document?

If you have checked it and still has some questions, please describe them.

This Katalon document covers imap and pop method, and these doesn’t work anymore. If one needs to send email report to outlook mailbox then only way is to go Via Mircrosoft Graph API .

OK, then how @saravanakumar1 can use Microsoft Graph API? Any more instruction?

The following seems to be related to the topic:

I’ll provide a high-level overview of the process.

Nowadays, both Microsoft and Google have tightened their security policies and no longer support the traditional email access methods that were commonly used for test automation. Instead, email access must be performed through modern authentication mechanisms, such as Microsoft Graph API.

Since I have implemented this for Outlook, I can share the approach I followed:

1. Azure App Registration and Permissions
You need to register an application in Azure and generate the required credentials, such as the Client ID, Client Secret, and Tenant ID. These credentials are used to obtain an access token. During app registration, you must also grant the necessary Microsoft Graph API permissions (such as Mail.Read and Mail.Send) through the Azure Portal.

2. Access Token and Automation Development
Once the access token generation is in place, the next step is the coding implementation, which I demonstrated in the video. With the appropriate APIs and automation scripts, you can perform various mailbox operations, including:

  • Fetching OTPs or access codes from emails
  • Reading email content
  • Deleting emails from Outlook
  • Sending emails and automation reports
  • Managing mailbox data programmatically

Due to my company’s security policies, I’m unable to share the source code directly. However, I have created additional use cases around these functionalities, and you may find them useful as references.

Also, I highly recommend leveraging StudioAssist or any AI-powered coding assistant. These tools can significantly speed up script development and help generate much of the required automation code.