<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create an  alert using sendemail to send only particular set of results to repective email ID in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519554#M3426</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158935"&gt;@yeahnah&lt;/a&gt;&amp;nbsp; Thanks very much for your quick responce!&lt;/P&gt;&lt;P&gt;Actully its adding all the values into a single row, we have more number values&amp;nbsp; to be added while sending attachment to the owners so giving all the values in single row is bit difficult for them to understand&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are expecting the output something like this in attachment :&amp;nbsp;&lt;/P&gt;&lt;TABLE width="959"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="71"&gt;id&lt;/TD&gt;&lt;TD width="75"&gt;AccountName&lt;/TD&gt;&lt;TD width="120"&gt;AccountID&lt;/TD&gt;&lt;TD width="117"&gt;AccountGroup&lt;/TD&gt;&lt;TD width="130"&gt;Policy&lt;/TD&gt;&lt;TD width="65"&gt;Policyseverity&lt;/TD&gt;&lt;TD width="95"&gt;SLA Status&lt;/TD&gt;&lt;TD width="99"&gt;Account Type&lt;/TD&gt;&lt;TD width="187"&gt;Remediation_Contact_Email&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;prod&lt;/TD&gt;&lt;TD&gt;1234&lt;/TD&gt;&lt;TD&gt;Application&lt;/TD&gt;&lt;TD&gt;S3 - Not encrypted&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;NA&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:abc123@xyz.com" target="_blank"&gt;abc123@xyz.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;778&lt;/TD&gt;&lt;TD&gt;qa&lt;/TD&gt;&lt;TD&gt;5678&lt;/TD&gt;&lt;TD&gt;Security&lt;/TD&gt;&lt;TD&gt;VPN Voilation&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;NA&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:abc123@xyz.com" target="_blank"&gt;abc123@xyz.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;889&lt;/TD&gt;&lt;TD&gt;test&lt;/TD&gt;&lt;TD&gt;9876&lt;/TD&gt;&lt;TD&gt;cloud&lt;/TD&gt;&lt;TD&gt;EC2 out of memory&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;NA&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:abc123@xyz.com" target="_blank"&gt;abc123@xyz.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;243&lt;/TD&gt;&lt;TD&gt;dev&lt;/TD&gt;&lt;TD&gt;54321&lt;/TD&gt;&lt;TD&gt;All&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Within SLA&lt;/TD&gt;&lt;TD&gt;Non-Prod&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:abc123@xyz.com" target="_blank"&gt;abc123@xyz.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Sep 2020 19:45:56 GMT</pubDate>
    <dc:creator>Jithu1717</dc:creator>
    <dc:date>2020-09-14T19:45:56Z</dc:date>
    <item>
      <title>How to create an  alert using sendemail to send only particular set of results to repective email ID</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/518974#M3369</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hello!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;We have a requierment to create an alert for one of the cloud application data. The following fields are like account name, account id etc should be sent to the repective&amp;nbsp;&lt;STRONG&gt;RemediationContactEmail&lt;/STRONG&gt;&amp;nbsp;id. we are able to create an alert with all the above with csv attachment by using command&amp;nbsp;&lt;STRONG&gt;sendemail&amp;nbsp;&lt;/STRONG&gt;However we observed that for particular set of results , if &lt;SPAN&gt;th&lt;/SPAN&gt;&lt;SPAN&gt;e recipients are same , in that case they will be receiving email for each results.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;For example We tried below sample query to make some sample event sets using makeresults :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;| makeresults &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;| eval id="12345" &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;| eval Account_ID=1234567&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;| eval Remediation_Contact_Email=&lt;U&gt;&lt;FONT color="#0000FF"&gt;"abc123@xyz.com" &lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;| append &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[| makeresults &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| eval id="67890" &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| eval Account_ID=4567895&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;| eval Remediation_Contact_Email=&lt;FONT color="#0000FF"&gt;&lt;U&gt;"abc123@xyz.com"&lt;/U&gt;&lt;/FONT&gt; ] &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;| append &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[| makeresults &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| eval id="13579" &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| eval Account_ID=6785432&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;| eval Remediation_Contact_Email=&lt;FONT color="#0000FF"&gt;&lt;U&gt;"abc123@xyz.com"&lt;/U&gt;&lt;/FONT&gt;&amp;nbsp;] &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;| map &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ makeresults &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| eval id="$id$" &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| eval Account_ID=$Account_ID$ &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| eval Remediation_Contact_Email="$Remediation_Contact_Email$" &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| fields - _time &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| sendemail to=$Remediation_Contact_Email$ subject="Test Sendemail" message="&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;Hello,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;There is an alert for your account &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;id&amp;nbsp; : $id$&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;account id : $Account_ID$&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;xyz Security Operation Team" maxinputs=10000 sendcsv=true inline=true format=csv priority=1 ]&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="2"&gt;Here the recipient &lt;FONT color="#0000FF"&gt;"&lt;U&gt;abc123@xyz.com&lt;/U&gt;"&lt;/FONT&gt;&amp;nbsp;received 3 different emails for each result with attachments as shown in the bellow screenshot.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="send email.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10765i844BE58FFF8C52F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="send email.PNG" alt="send email.PNG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&lt;SPAN&gt;&amp;nbsp;Any help or guidance will be&amp;nbsp;&lt;FONT color="#cc0033"&gt;much appreciated h&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="verdana,geneva" size="2"&gt;ere to group all the relevant results in data set with respect to remidiation contact email id and send their results in single attachmen&lt;SPAN&gt;t.&lt;/SPAN&gt; We tried to group it using stats command however the attachment doesn’t look good as it will have a single row with all results for that particular email.&lt;/FONT&gt;&lt;FONT face="verdana,geneva" size="2"&gt;we have more number of RemediationContactEmail id for each Account group in data set so if there are any 10 alerts triggered for one respective&amp;nbsp;RemediationContactEmail id all the 10 alerts should be consolidated and grouped from data set then send it to that particullar recepient as one attachment rather than sending 10 different emails&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 00:02:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/518974#M3369</guid>
      <dc:creator>Jithu1717</dc:creator>
      <dc:date>2020-09-11T00:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an  alert using sendemail to send only particular set of results to repective email ID</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/518980#M3370</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226118"&gt;@Jithu1717&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;T&lt;FONT face="inherit"&gt;he &lt;/FONT&gt;following&lt;FONT face="inherit"&gt;&amp;nbsp;should suit your use case (if you don;t mind the id and account id being on the same line in email body) ...&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval id="12345" 
| eval Account_ID=1234567 
| eval Remediation_Contact_Email="abc123@xyz.com" 
| append 
    [| makeresults 
    | eval id="67890" 
    | eval Account_ID=4567895 
    | eval Remediation_Contact_Email="abc123@xyz.com" ] 
| append 
    [| makeresults 
    | eval id="13579" 
    | eval Account_ID=6785432 
    | eval Remediation_Contact_Email="abc123@xyz.com" ] 
| eval msg="id: " . id . " account id: " . Account_ID . "|" 
| stats values(msg) AS msg BY Remediation_Contact_Email 
| map 
    [ makeresults 
    | eval msg=ltrim(split($msg$, "|")) 
    | eval Remediation_Contact_Email="$Remediation_Contact_Email$" 
    | fields - _time 
    | sendemail to=$Remediation_Contact_Email$ subject="Test Sendemail" message="
Hello,

There is an alert for your account(s)

 $msg$

 Regards,

xyz Security Operation Team" maxinputs=10000 sendcsv=true inline=true format=csv priority=1 
]&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps.&amp;nbsp; If it solves your issue then please mark the post as solved.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 01:07:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/518980#M3370</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2020-09-11T01:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an  alert using sendemail to send only particular set of results to repective email ID</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519554#M3426</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158935"&gt;@yeahnah&lt;/a&gt;&amp;nbsp; Thanks very much for your quick responce!&lt;/P&gt;&lt;P&gt;Actully its adding all the values into a single row, we have more number values&amp;nbsp; to be added while sending attachment to the owners so giving all the values in single row is bit difficult for them to understand&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are expecting the output something like this in attachment :&amp;nbsp;&lt;/P&gt;&lt;TABLE width="959"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="71"&gt;id&lt;/TD&gt;&lt;TD width="75"&gt;AccountName&lt;/TD&gt;&lt;TD width="120"&gt;AccountID&lt;/TD&gt;&lt;TD width="117"&gt;AccountGroup&lt;/TD&gt;&lt;TD width="130"&gt;Policy&lt;/TD&gt;&lt;TD width="65"&gt;Policyseverity&lt;/TD&gt;&lt;TD width="95"&gt;SLA Status&lt;/TD&gt;&lt;TD width="99"&gt;Account Type&lt;/TD&gt;&lt;TD width="187"&gt;Remediation_Contact_Email&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;prod&lt;/TD&gt;&lt;TD&gt;1234&lt;/TD&gt;&lt;TD&gt;Application&lt;/TD&gt;&lt;TD&gt;S3 - Not encrypted&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;NA&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:abc123@xyz.com" target="_blank"&gt;abc123@xyz.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;778&lt;/TD&gt;&lt;TD&gt;qa&lt;/TD&gt;&lt;TD&gt;5678&lt;/TD&gt;&lt;TD&gt;Security&lt;/TD&gt;&lt;TD&gt;VPN Voilation&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;NA&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:abc123@xyz.com" target="_blank"&gt;abc123@xyz.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;889&lt;/TD&gt;&lt;TD&gt;test&lt;/TD&gt;&lt;TD&gt;9876&lt;/TD&gt;&lt;TD&gt;cloud&lt;/TD&gt;&lt;TD&gt;EC2 out of memory&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;NA&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:abc123@xyz.com" target="_blank"&gt;abc123@xyz.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;243&lt;/TD&gt;&lt;TD&gt;dev&lt;/TD&gt;&lt;TD&gt;54321&lt;/TD&gt;&lt;TD&gt;All&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Within SLA&lt;/TD&gt;&lt;TD&gt;Non-Prod&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:abc123@xyz.com" target="_blank"&gt;abc123@xyz.com&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 19:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519554#M3426</guid>
      <dc:creator>Jithu1717</dc:creator>
      <dc:date>2020-09-14T19:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an  alert using sendemail to send only particular set of results to repective email ID</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519562#M3427</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226118"&gt;@Jithu1717&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I must admit to being a bit confused as to what you're actually asking for.&amp;nbsp; &amp;nbsp;If it is just to split the email body content into multi-line output per id, then something like the following will do it (adjust as per your fields etc)&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval id="12345" 
| eval Account_ID=1234567 
| eval Remediation_Contact_Email="abc123@xyz.com" 
| append 
    [| makeresults 
    | eval id="67890" 
    | eval Account_ID=4567895 
    | eval Remediation_Contact_Email="abc123@xyz.com" ] 
| append 
    [| makeresults 
    | eval id="13579" 
    | eval ,Account_ID=6785432 
    | eval Remediation_Contact_Email="abc123@xyz.com" ] 
| eval msg="id: " . id . ",account id: " . Account_ID . ",next_field: ... , ... , |" 
| stats values(msg) AS msg BY Remediation_Contact_Email 
| map 
    [ makeresults 
    | eval msg=ltrim(split($msg$, "|")) 
    | mvexpand msg
    | eval msg=split(msg, ",")
    | eval Remediation_Contact_Email="$Remediation_Contact_Email$" 
    | stats list(msg) BY Remediation_Contact_Email 
    | sendmail ... ]&lt;/LI-CODE&gt;&lt;P&gt;Or is it to do with the attachment that is send with the email?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 20:30:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519562#M3427</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2020-09-14T20:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an  alert using sendemail to send only particular set of results to repective email ID</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519589#M3429</link>
      <description>&lt;P&gt;try this app, I think it does all the things necessary, the sendemail+map has display limitations that can't really be overcome&lt;/P&gt;&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1794/#/details" target="_blank"&gt;https://splunkbase.splunk.com/app/1794/#/details&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 03:02:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519589#M3429</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2020-09-15T03:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an  alert using sendemail to send only particular set of results to repective email ID</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519787#M3443</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/159620"&gt;@marycordova&lt;/a&gt;&amp;nbsp; Thank you! This app have been tested already. Using this we are unable to add any csv or pdf attachment to email also the email body is not in a proper format.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 20:30:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519787#M3443</guid>
      <dc:creator>Jithu1717</dc:creator>
      <dc:date>2020-09-15T20:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an  alert using sendemail to send only particular set of results to repective email ID</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519806#M3444</link>
      <description>&lt;P&gt;This is as good as it gets:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index sourcetype=sourcetype status="open" reason="NEW_ALERT" u_account_contact_email!="" Translated_Severity IN (4,5) NOT "resource.data.tags{}.value"="exception"
| dedup id 
| eval _time=round(('lastSeen'/1000),0) 
| eval limit=round(relative_time(now(),"-13h@h"),0) 
| where _time&amp;gt;limit 
| eval remediator=rtrim(ltrim(lower('u_account_contact_email')))
| eval account="Account ID " + 'resource.accountId'
| eval policy="Policy " + 'policy.name'
| eval resource="resource(s) " + 'resource.name'
| eval target=mvzip('account','resource'," ")
| eval recommendation=if('policy.recommendation'=="" or isnull('policy.recommendation'),"No Recommendations Available",'policy.recommendation')
| stats values(target) as target by remediator policy recommendation
| eval target=mvjoin('target',"
")
| eval remediation=mvzip('recommendation','target',"
___________________________________________________
")
| eval violation=mvzip('policy','remediation',"
___________________________________________________
")
| stats values(violation) as violation by remediator
| eval violation=mvjoin('violation',"

#############################################################################

")
| table violation remediator
| map 
    [| makeresults 
    | eval violation=$violation$ 
    | eval remediator=$remediator$
    | table violation remediator 
    | sendemail to=$remediator$ from="infosec@company.com" subject="New Alerts for your Cloud Environments" content_type=html format=table inline=true sendresults=true ]&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 16 Sep 2020 01:26:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-create-an-alert-using-sendemail-to-send-only-particular/m-p/519806#M3444</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2020-09-16T01:26:14Z</dc:date>
    </item>
  </channel>
</rss>

