<?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: sendemail.  email averrable in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571352#M199100</link>
    <description>&lt;P&gt;You probably can get around it but I would advise against doing it this way.&lt;/P&gt;&lt;P&gt;Firstly, you can't just use one "| sendemail" do spawn several email sending processes. For that you'd have to do some fancy "| map" thing. Secondly, sending emails to dynamicaly generated addresses... well, that's risky. Are you 100% sure your addresses are all right?&lt;/P&gt;&lt;P&gt;So yes, you can use "| map" to generate a separate sendemail command for each results row but I'd advise you to either write own alert action or give the idea up completely and think of another way to do that.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Oct 2021 14:53:14 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2021-10-18T14:53:14Z</dc:date>
    <item>
      <title>sendemail.  email averrable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571347#M199099</link>
      <description>&lt;P&gt;on the output I get the result with users. the username is similar to the name of the mail. how do i call the username variable in the sendemail command&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;username&lt;/TD&gt;&lt;TD width="25%"&gt;abc&lt;/TD&gt;&lt;TD width="25%"&gt;abc1&lt;/TD&gt;&lt;TD width="25%"&gt;abc2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;John&lt;/TD&gt;&lt;TD width="25%"&gt;1&lt;/TD&gt;&lt;TD width="25%"&gt;2&lt;/TD&gt;&lt;TD width="25%"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Smith&lt;/TD&gt;&lt;TD width="25%"&gt;3&lt;/TD&gt;&lt;TD width="25%"&gt;1&lt;/TD&gt;&lt;TD width="25%"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Georgy&lt;/TD&gt;&lt;TD width="25%"&gt;2&lt;/TD&gt;&lt;TD width="25%"&gt;3&lt;/TD&gt;&lt;TD width="25%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;| sendemail to="$username$@gmail.com" sendresults=true subject="Test sub" message="message"&lt;/P&gt;&lt;P&gt;error&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;command="sendemail", {u'@gmail.com': (501, '5.1.3 Invalid address')} while sending mail to: &lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/186194" target="_blank"&gt;@gmail&lt;/A&gt;.com&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;in the output, the variable takes the username, gets everyone's name and sends a message to everyone&lt;/P&gt;&lt;P&gt;And is it possible to make everyone get only their own line of output?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks !!!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 14:36:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571347#M199099</guid>
      <dc:creator>gitingua</dc:creator>
      <dc:date>2021-10-18T14:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: sendemail.  email averrable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571352#M199100</link>
      <description>&lt;P&gt;You probably can get around it but I would advise against doing it this way.&lt;/P&gt;&lt;P&gt;Firstly, you can't just use one "| sendemail" do spawn several email sending processes. For that you'd have to do some fancy "| map" thing. Secondly, sending emails to dynamicaly generated addresses... well, that's risky. Are you 100% sure your addresses are all right?&lt;/P&gt;&lt;P&gt;So yes, you can use "| map" to generate a separate sendemail command for each results row but I'd advise you to either write own alert action or give the idea up completely and think of another way to do that.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 14:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571352#M199100</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-10-18T14:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: sendemail.  email averrable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571362#M199103</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;Yes. I'm sure the names are the same as the email address. how to write an application correctly. write please?&lt;BR /&gt;I tried to write "| eval email = $username$."@gmail.com"" the address comes out almost, but the command "| sendemail &lt;STRONG&gt;to = $email$&lt;/STRONG&gt;" does not accept for some reason&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 15:17:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571362#M199103</guid>
      <dc:creator>gitingua</dc:creator>
      <dc:date>2021-10-18T15:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: sendemail.  email averrable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571476#M199144</link>
      <description>&lt;P&gt;As I said earlier - if you just pipe results of a search to a sendemail command, you'll just issue one command for the whole set of results. I suppose it's not what you want. You want to launch separate sendemail for each row of result set.&lt;/P&gt;&lt;P&gt;That's what map command is for. If you're really sure you know what you're doing, use that command to spawn |sendemail for each row of your result set but that's a very ugly idea. Especially if you have many rows in your result set.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 07:53:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571476#M199144</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-10-19T07:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: sendemail.  email averrable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571489#M199145</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;OK. I heard you. but you can somehow pass the created variable "email". to the "to" part of the "sendemail" command? without sending the result? something like this | sendemail to=$email$&amp;nbsp;message="Test messages to users". ? It does not see "$email$" in this format&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 09:45:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571489#M199145</guid>
      <dc:creator>gitingua</dc:creator>
      <dc:date>2021-10-19T09:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: sendemail.  email averrable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571512#M199150</link>
      <description>&lt;P&gt;Have you checked how the map command works? Templating parameters is its core functionality. Oh, and in your case you'd probably not want to send all results, just create a predefined (possibly templated) email contents.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:37:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sendemail-email-averrable/m-p/571512#M199150</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-10-19T13:37:21Z</dc:date>
    </item>
  </channel>
</rss>

