How to Setup Email with SMTP

How to Setup Email with SMTP

Introduction

Leapwork is capable of sending e-mails in various ways. For example, when configuring a schedule, it is possible to add an e-mail action to forward the results of the schedule to mail recipients. Another way to send an e-mail is to use the Send e-mail building block as part of a flow.

Leapwork supports two different ways to connect to an email server:

Note: SMTP is the default approach for sending an e-mail. Email settings access is only available to Admin.

Set Up an Email with SMTP:

SMTP is a basic authentication protocol for sending emails through servers from one machine to another machine.

To send an e-mail, Leapwork needs access to a SMTP server, which is configured in the E-mail settings part of Leapwork’s settings. You need to contact your mail and network administrators to ensure that Leapwork can access the SMTP server and that you have the right credentials to be allowed to send e-mails.

  1. Open the Email Settings in Leapwork: Settings >> Email Settings.

  2. Select the Protocol = "SMTP" from the drop-down:

  3. Enter SMTP Server details in the given field. (Hostname or IP address of the SMTP server)

  4. Enter SMTP Port details in the given field.

  5. Enter From Mailbox details in the given field.

  6. Enter SMTP Username details in the given field. (The username for logging into the SMTP server)

  7. Enter SMTP Password details in the given field. (The password for the SMTP Username account)

  8. Check the Accept any certificate checkbox. This configuration instructs Leapwork to ignore any invalid SSL certificates in the communication with the SMTP server.

Note: SMTP Server and SMTP Port are the default fields. The values of these are auto-filled and you can change these values based on your requirement.

  1. Click the Test connection button to test that the configuration is working correctly. This will do a login to the SMTP server to verify the SMTP Server, SMTP Username, and SMTP Password.

The success message appears to let you know that the SMTP server is connected successfully.

  1. Click Send test email button to use the configuration to send a test e-mail to the e-mail address specified in the From Mailbox field.

The success message appears to let you know that the email is sent successfully.

  1. Click Cancel button to cancel the details.

  2. Click Save button to save the details.

Note: In Leapwork, communication with the SMTP server depends on how the execution is initiated. When email settings are configured and a preview run is executed, the communication occurs directly between the Studio machine and the email server. However, during scheduled executions triggered via a Runlist, the Leapwork Controller is responsible for initiating communication with the email server. This behavior is by design and aligns with the intended architecture of Leapwork components.

If you have any questions, please contact our Priority Support.