Attachments with notifications?


jlficken

Recommended Posts

Attachments are not possible, but you can include messages (-m option).

notify [-e "event"] [-s "subject"] [-d "description"] [-i "normal|warning|alert"] [-m "message"] [-x] [-t] [add]
  create a notification
  use -e to specify the event
  use -s to specify a subject
  use -d to specify a short description
  use -i to specify the severity
  use -m to specify a message (long description)
  use -x to create a single notification ticket
  use -r to specify recipients and not use default
  use -t to force send email only (for testing)
  all options are optional

notify init
  Initialize the notification subsystem.

notify smtp-init
  Initialize sendmail configuration (ssmtp in our case).

notify get
  Output a json-encoded list of all the unread notifications.

notify archive file
  Move file from 'unread' state to 'archive' state.

 

Link to comment
  • 2 years later...
  • 1 month later...
On 1/16/2022 at 3:53 PM, Muzzy said:

Hi, how exactly i can use -m parameter to add the content of the script log file to mail?

Thanks

 

This works for me:

 

 

/usr/local/emhttp/plugins/dynamix/scripts/notify -e "test" -s "test2" -d "test3" -i "normal" -m "$(cat /path/to/logfile.log)"

 

  • Like 1
  • Thanks 1
Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.