Splunk Enterprise

sendMail "From= "

alvesri
Engager

Hi guys, 

Thank you in advance, 

Is it possible to use a value of the search result as a parameter in the |sendmail from=" ? "

In the | sendmail to="we can use results.mail_to" but in case of | sendmail from="results.mail_from" don't work.

We already disable the security options for this.

 
like for example 


i

ndex="main"

| eval mail_from = "username@mail.com"
| eval mail_to = "username@mail.com"
| eval subject = "subject"

| table username age country city

| sendemail to=$result.mail_to$ from= $result_mail_from$ subject=$results.subject$ message="This is an example message" sendresults=true inline=true format=table sendcsv=true
Labels (1)
0 Karma

kartm2020
Communicator

Hi,

Can you please use the mail server parameter with the email ID as mentioned in the below docs.

server="server info"

https://docs.splunk.com/Documentation/Splunk/8.1.0/Alert/Emailnotification

 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

you must use valid email address on from field. Currently most email servers require that those senders must be within valid and permitted domains. Depending on your configuration it could be that you can use only that from field and user which are configured into your splunk and given by email provider.

r. Ismo

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...