• Migration Topics
  • Integration
    • Standard ActionHandlers
    • ServiceNow
    • SAP
    • Email
      • Introduction
    • CSV
    • Approval
    • Introduction to ActionHandlers and Connectors
  • Concepts
  • Best Practices
  • Api
Table of Contents

Introduction

The SendEmail capability is designed to send either a HTML or Plain email to one or more pre-defined recipients.

Example usage

ki
  name: "Send an email"
  description: "Send an email"
  version: "1"
on
  ogit/_id
when
  ShouldSendEmail=="true"
do
  exec: LOCAL::RESULT,
  stdout: LOCAL::OUTPUT,
  stderr: LOCAL::ERROR,
  exit: LOCAL::SYSTEMRC = action(
      capability: "SendEmail",
      from: "user@example.com",
      to: "user@example.com",
      subject: "Hello",
      body: "Hey dear customer! Click <a href=\"http://example.com\">this link</a>",
      type: "html")
  log.info(LOCAL::RESULT)
  log.info(LOCAL::OUTPUT)
  log.error(LOCAL::ERROR)
  log.info(LOCAL::SYSTEMRC)
  delete(ShouldSendEmail)
  • The capability should be set to SendEmail

  • The from email address needs to be authorised on the SMTP server with the SMTP credentials provided.

  • The to is the recipient email address. cc and bcc can also be provided

  • The body is the email content, and can be Plain or HTML

  • The type should be set to plain or html depending on the email body content