Reporting

How to get sendemail.py to work

Roozbeh59
New Member

We want to include an image in the body of the email before it is sent out. However, "action.email.message.report" only allows texts in the box, so we modified sendemail.py script. The original file is in $SPLUNK_HOME$/etc/apps/search/bin folder. How do I make the updated sendemail.py script working?

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi
You can update It. But I suggest following below steps.

Make sure your changes will be done in your app only.

1) Create a commands.conf.

[sendemail]
filename =  my_sendmail.py
streaming = false
run_in_preview = false
passauth = true
required_fields =
changes_colorder = false
supports_rawargs = true
undo_scheduler_escaping = true
is_risky = true
local = true

2) Copy ./search/bin/sendemail.py to YOUR__APP/bin/my_sendmail.py

Do not change in search/bin/sendemail.py file.
Do appropriate changes in YOUR__APP/bin/my_sendmail.py only as per your requirements.

Within your app, sendmail will work as per you made changes in my_sendmail.py

Let me know for further assistance.

Thanks

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...