sendemail
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Contents
sendemail
Synopsis
Emails search results to specified email addresses.
Syntax
sendemail to=email_list [from=email_list] [cc=email_list] [bcc=email_list] [format= (html|raw|text|csv)] [inline= (true|false)] [priority= (highest|high|low|lowest)] [server=string] [showresults=(true|false)] [graceful=bool]
Arguments
- to
- Datatype: <email_list>
- Description: Emails search results to a specified email addresses
- from
- Datatype: <email_list>
- Description: default is splunk results o from - from line
- cc
- Datatype: <email_list>
- Description: o to - to line; comma-separated quoted list of valid email addresses: someone@domain.tld o cc - cc line; comma-separated quoted list of valid email addresses: someone@domain.tld o bcc - blind cc line; comma-separated quoted list of valid email addresses: someone@domain.tld o format - html|raw|text|csv
- bcc
- Datatype: <email_list>
- Description: o to - to line; comma-separated quoted list of valid email addresses: someone@domain.tld o cc - cc line; comma-separated quoted list of valid email addresses: someone@domain.tld o bcc - blind cc line; comma-separated quoted list of valid email addresses: someone@domain.tld o format - html|raw|text|csv
- server
- Datatype: <string>
- Description: o server - smtp server
- graceful
- Datatype: <bool>
- Description: o graceful - if set to true, no error is thrown, if email sending fails and thus the search pipeline continues execution as if sendemail was not there.
Description
Emails search results to a specified email addresses. o subject- text; specifies the subject line. default is splunk results o from - from line. something like: someone@domain.tld. default is splunk@hostname. o to - to line; comma-separated quoted list of valid email addresses: someone@domain.tld o cc - cc line; comma-separated quoted list of valid email addresses: someone@domain.tld o bcc - blind cc line; comma-separated quoted list of valid email addresses: someone@domain.tld o format - html|raw|text|csv. default is html. o inline - true|false|none. determines whether results are in the message body or sent as an attachment, inline or not included. defaults to true. o priority - lowest or 5, low or 4, high or 2, highest or 1. Default: normal. Set the priority of the email as it appears in the email client. o server - smtp server. default is localhost. o graceful - if set to true, no error is thrown, if email sending fails and thus the search pipeline continues execution as if sendemail was not there.
Examples
Example 1: Send search results in HTML format with the subject "myresults".
... | sendemail to="elvis@splunk.com,john@splunk.com" format=html subject=myresults server=mail.splunk.comExample 2: Send search results to the specified email.
... | sendemail to="elvis@splunk.com"This documentation applies to the following versions of Splunk: 4.0 , 4.0.1 , 4.0.2 , 4.0.3 , 4.0.4 , 4.0.5 , 4.0.6 , 4.0.7 , 4.0.8 , 4.0.9 , 4.0.10 , 4.0.11 View the Article History for its revisions.