<?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 sendmail to multiple users based on table output in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/sendmail-to-multiple-users-based-on-table-output/m-p/755656#M12705</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I want to send multiple mails, based on the data in the seearch results.&lt;BR /&gt;I have tried many posts, but i am still unable to get this working.&lt;/P&gt;&lt;P&gt;For each email address i want to send an email.&lt;BR /&gt;In my example i want to send 2 emails.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is my query example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval kol1="line-1",kol2="line-1", email="j.doe@splunk.com"
| append [ | makeresults | eval kol1="line-2",kol2="line-2", email="j.doe@splunk.com" ]
| append [ | makeresults | eval kol1="line-3",kol2="line-3", email="j.doe@splunk.com" ]
| append [ | makeresults | eval kol1="line-1",kol2="line-1", email="p.doe@splunk.com" ]
| append [ | makeresults | eval kol1="line-2",kol2="line-2", email="p.doe@splunk.com" ]
| table kol1 kol2 email
| map search="|makeresults |sendemail to="$email$" from="me@sample.com" incline=true sendresults=true subject="test" message=$kol1$ $kol2$"&lt;/LI-CODE&gt;&lt;P&gt;The result is, that i a getting 5 emails, with a content of only kol1 as message&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am thinking of alternatives, but that looks to complicated for now , like this...&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Cloud-Platform/Send-email-to-multiple-users-with-respective-data-based-on-the/m-p/704718" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Cloud-Platform/Send-email-to-multiple-users-with-respective-data-based-on-the/m-p/704718&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is it somehow possible to do get this working?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Harry&lt;/P&gt;</description>
    <pubDate>Wed, 19 Nov 2025 06:25:03 GMT</pubDate>
    <dc:creator>harryvdtol</dc:creator>
    <dc:date>2025-11-19T06:25:03Z</dc:date>
    <item>
      <title>sendmail to multiple users based on table output</title>
      <link>https://community.splunk.com/t5/Reporting/sendmail-to-multiple-users-based-on-table-output/m-p/755656#M12705</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I want to send multiple mails, based on the data in the seearch results.&lt;BR /&gt;I have tried many posts, but i am still unable to get this working.&lt;/P&gt;&lt;P&gt;For each email address i want to send an email.&lt;BR /&gt;In my example i want to send 2 emails.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is my query example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval kol1="line-1",kol2="line-1", email="j.doe@splunk.com"
| append [ | makeresults | eval kol1="line-2",kol2="line-2", email="j.doe@splunk.com" ]
| append [ | makeresults | eval kol1="line-3",kol2="line-3", email="j.doe@splunk.com" ]
| append [ | makeresults | eval kol1="line-1",kol2="line-1", email="p.doe@splunk.com" ]
| append [ | makeresults | eval kol1="line-2",kol2="line-2", email="p.doe@splunk.com" ]
| table kol1 kol2 email
| map search="|makeresults |sendemail to="$email$" from="me@sample.com" incline=true sendresults=true subject="test" message=$kol1$ $kol2$"&lt;/LI-CODE&gt;&lt;P&gt;The result is, that i a getting 5 emails, with a content of only kol1 as message&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am thinking of alternatives, but that looks to complicated for now , like this...&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Cloud-Platform/Send-email-to-multiple-users-with-respective-data-based-on-the/m-p/704718" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Cloud-Platform/Send-email-to-multiple-users-with-respective-data-based-on-the/m-p/704718&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is it somehow possible to do get this working?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Harry&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 06:25:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/sendmail-to-multiple-users-based-on-table-output/m-p/755656#M12705</guid>
      <dc:creator>harryvdtol</dc:creator>
      <dc:date>2025-11-19T06:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to multiple users based on table output</title>
      <link>https://community.splunk.com/t5/Reporting/sendmail-to-multiple-users-based-on-table-output/m-p/755675#M12706</link>
      <description>&lt;P&gt;I am going to do it in two steps&lt;BR /&gt;Make an outputlookup for the data.&lt;BR /&gt;And with another search inputlookup and this commanmd&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup mytempdata.csv
| stats values(email) as email
| mvexpand email
| map search="
    | inputlookup mytempdata.csv
    | where match(email, \"^$email$\")
    | sendemail
        to=\"$email$\"
        subject=\"My Subject\"
        message=\"My Message\"
        sendresults=true
        inline=true 
        format=table 
        sendpdf=false 
        sendcsv=false
    " maxsearches=100&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 19 Nov 2025 13:52:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/sendmail-to-multiple-users-based-on-table-output/m-p/755675#M12706</guid>
      <dc:creator>harryvdtol</dc:creator>
      <dc:date>2025-11-19T13:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to multiple users based on table output</title>
      <link>https://community.splunk.com/t5/Reporting/sendmail-to-multiple-users-based-on-table-output/m-p/755676#M12707</link>
      <description>&lt;P&gt;And it works&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 13:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/sendmail-to-multiple-users-based-on-table-output/m-p/755676#M12707</guid>
      <dc:creator>harryvdtol</dc:creator>
      <dc:date>2025-11-19T13:52:55Z</dc:date>
    </item>
  </channel>
</rss>

