<?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 Sendemail command email body in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Sendemail-command-email-body/m-p/673064#M11860</link>
    <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;I am using send email command to send csv file to different recepients based on the search .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval subject="This is test subject" ,email_body= "This is test email body"
| map  search="|inputcsv test.csv | where owner=\"$email$\" | sendemail sendcsv=true to=\"$email$\" subject=\"$subject$\" message="\$email_body$\""&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want email body as "This is test email body". Instead I am getting "Search Results attached". I understand message depend on the arguments passed. As I am passing sendcsv=true, I am getting this. I am using sendcsv as I am sending results as attachment(csv file). Please let me know how can I pass custom message to email body.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;PNV&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jan 2024 21:04:33 GMT</pubDate>
    <dc:creator>Poojitha</dc:creator>
    <dc:date>2024-01-02T21:04:33Z</dc:date>
    <item>
      <title>Sendemail command email body</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Sendemail-command-email-body/m-p/673064#M11860</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;I am using send email command to send csv file to different recepients based on the search .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval subject="This is test subject" ,email_body= "This is test email body"
| map  search="|inputcsv test.csv | where owner=\"$email$\" | sendemail sendcsv=true to=\"$email$\" subject=\"$subject$\" message="\$email_body$\""&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want email body as "This is test email body". Instead I am getting "Search Results attached". I understand message depend on the arguments passed. As I am passing sendcsv=true, I am getting this. I am using sendcsv as I am sending results as attachment(csv file). Please let me know how can I pass custom message to email body.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;PNV&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 21:04:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Sendemail-command-email-body/m-p/673064#M11860</guid>
      <dc:creator>Poojitha</dc:creator>
      <dc:date>2024-01-02T21:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sendemail command email body</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Sendemail-command-email-body/m-p/673093#M11861</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241735"&gt;@Poojitha&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I think this looks like a the msg token issue.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Could you pls try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults |eval custommessage="sample sendemail message body" 
|eval dest="mailid@domain.com" 
|sendemail to="$result.dest$" message="$result.custommessage$"&lt;/LI-CODE&gt;&lt;P&gt;then check if the message body appears as you are expecting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;more details:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.1.2/SearchReference/sendemail" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.1.2/SearchReference/sendemail&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.1.2/Alert/EmailNotificationTokens" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.1.2/Alert/EmailNotificationTokens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;upvotes / karma points are appreciated, thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 05:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Sendemail-command-email-body/m-p/673093#M11861</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-01-03T05:04:22Z</dc:date>
    </item>
  </channel>
</rss>

