Good day Everyone
I have designed a playbook and use outbound function to send an email to the concern user. I have used the below script but when playbook is running and move to outbound email phase it got stuck.
Looking forward for a Positive Response
inputs.mail_to= User Email
inputs.mail_body_text=" Soar"
inputs.mail_cc="abc@....."
inputs.mail_from="test@soar.com"
inputs.mail_subject ="Failure"
inputs.mail_body_html = """{% set NOT_FOUND = ["Not Found!","-","None",None] %}
{% macro get_row(label,field_name) -%}
{% set value = template_helper.get_incident_value(incident,field_name) %}
{% set style = "font-family: Calibri; color: rgb(31,73,125)" %}
{% if value and value not in NOT_FOUND and not value.startswith('-') %}
<tr>
<td width="100" style="{{style}}; font-weight:bold">{{ label }}</td>
<td style="{{style}}">{{ value | striptags }}</td>
</tr>
{% endif %}
{%- endmacro %}
<table width="100%" >
<tr>
<td colspan="2">
<h3 style="color: rgb(68,114,196)">INCIDENT DETAILS</h3>
<hr size="1" width="100%" noshade style="color:#FFDF57" align="center"/>
</td>
</tr>
{{ get_row('Severity:','severity_code') }}
{{ get_row('Status:','plan_status') }}<br>
{{ get_row('Created:','create_date') }}<br>
{{ get_row('Category:','incident_type_ids') }}
<tr>
<td colspan="2">
<br><h3 style="color: rgb(68,114,196)">INCIDENT DESCRIPTION</h3>
<hr size="1" width="100%" noshade style="color:#FFDF57" align="center"/>
</td>
{{ get_row('Description:','description') }}
</tr>
<tr>
<td colspan="2">
<h3 style="color: rgb(68,114,196)">INCIDENT LINK</h3>
<hr size="1" width="100%" noshade style="color:#FFDF57" align="center"/>
</td>
</tr>
<tr>
<td colspan="2">
{% set inc_url = template_helper.generate_incident_url(incident.id) %}
<a target='_blank' href='{{ inc_url }}'>{{ incident.id }}: {{ incident.name }}</a>
</td>
</tr>
</table>
<br>
"""
------------------------------
Ahmad Hassan Tariq
------------------------------