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!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...