{"componentChunkName":"component---src-templates-default-template-tsx","path":"/documentation/integration/Email/introduction/","result":{"data":{"asciidoc":{"id":"8f8a0f59-d204-5e21-8c49-b306c9cb31e2","html":"<div id=\"toc\" class=\"toc\">\n<div id=\"toctitle\">Table of Contents</div>\n<ul class=\"sectlevel1\">\n<li><a href=\"#_introduction\">Introduction</a></li>\n<li><a href=\"#_example_usage\">Example usage</a></li>\n</ul>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_introduction\">Introduction</h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>The SendEmail capability is designed to send either a HTML or Plain email to one or more pre-defined recipients.</p>\n</div>\n</div>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_example_usage\">Example usage</h2>\n<div class=\"sectionbody\">\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>ki\n  name: \"Send an email\"\n  description: \"Send an email\"\n  version: \"1\"\non\n  ogit/_id\nwhen\n  ShouldSendEmail==\"true\"\ndo\n  exec: LOCAL::RESULT,\n  stdout: LOCAL::OUTPUT,\n  stderr: LOCAL::ERROR,\n  exit: LOCAL::SYSTEMRC = action(\n      capability: \"SendEmail\",\n      from: \"user@example.com\",\n      to: \"user@example.com\",\n      subject: \"Hello\",\n      body: \"Hey dear customer! Click &lt;a href=\\\"http://example.com\\\"&gt;this link&lt;/a&gt;\",\n      type: \"html\")\n  log.info(LOCAL::RESULT)\n  log.info(LOCAL::OUTPUT)\n  log.error(LOCAL::ERROR)\n  log.info(LOCAL::SYSTEMRC)\n  delete(ShouldSendEmail)</code></pre>\n</div>\n</div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p>The <code>capability</code> should be set to <code>SendEmail</code></p>\n</li>\n<li>\n<p>The <code>from</code> email address needs to be authorised on the SMTP server with the SMTP credentials provided.</p>\n</li>\n<li>\n<p>The <code>to</code> is the recipient email address. <code>cc</code> and <code>bcc</code> can also be provided</p>\n</li>\n<li>\n<p>The <code>body</code> is the email content, and can be Plain or HTML</p>\n</li>\n<li>\n<p>The <code>type</code> should be set to <code>plain</code> or <code>html</code> depending on the email body content</p>\n</li>\n</ul>\n</div>\n</div>\n</div>","document":{"main":"Approval Action Handler","title":"Approval Action Handler","subtitle":""},"fields":{"toc":true,"location":["documentation","integration","Email","introduction"]}},"sidebarYaml":{"id":"6d066bdd-c982-5a69-b909-a31e6fc044e0","showIndex":null}},"pageContext":{"id":"8f8a0f59-d204-5e21-8c49-b306c9cb31e2","parent":"documentation"}},"staticQueryHashes":["1010459453","1010459453","2356112386","2356112386","2603905930","2603905930","3026652197","3026652197","3167850324","3167850324","63159454","63159454"]}