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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...