Splunk Search

How to send a single email to multiple email id mentioned in different rows of the table

rahulbhatia
Path Finder

Hi All

I have following table as outcome of my query :-

Name lastname Emailid
A D abc@gm.com, xyz@redif.com
B E bcd@dm.com
C F fgh@yah.com

I want to send this table to all the email ID's mentioned under EmailID column in a single email.

Tags (1)
0 Karma
1 Solution

sandeepmakkena
Contributor
(YourSearch)
| eval mail= Emailid
| eventstats values(mail) AS mail_adresses 
| eval recipients=mvjoin(mail_adresses, ",") 
| table Name,lastname,mail, recipients
| sendemail to=$result.recipients$ 

Hope this helps, Thanks!

View solution in original post

0 Karma

sandeepmakkena
Contributor
(YourSearch)
| eval mail= Emailid
| eventstats values(mail) AS mail_adresses 
| eval recipients=mvjoin(mail_adresses, ",") 
| table Name,lastname,mail, recipients
| sendemail to=$result.recipients$ 

Hope this helps, Thanks!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...