Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Attachments with notifications?

Featured Replies

Is there any way to send attachments with the notify script?

 

I'd like to send the rsync log with the e-mail if possible.

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.

 

  • 2 years later...

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

Thanks

Edited by Muzzy

-m "This is the message"  

 

A log file however may be pretty long to do this, and would no doubt include CRs, quotes etc that you would have to properly escape.

So I understand correctly that there is no way to send either the log file or its contents via the internal notification system?

Why can't you access the logs from your server after you get the notification?

Of course I can, but reading the log in an email anywhere in the world is easier than connecting to vpn via some secure device, logging in to the server, finding the log and checking. I'm just asking, it would just be easier.

The notify script was never designed for what you want to do.  Investigate using the sendmail command or your own custom script using php's mail command etc...

Ok, thanks 🙂

  • 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)"

 

The message with the -m option is only available in email notifications.

The message can be indeed the content of a log file.

 

  • 2 weeks later...
On 2/22/2022 at 7:34 PM, emvau said:
/usr/local/emhttp/plugins/dynamix/scripts/notify -e "test" -s "test2" -d "test3" -i "normal" -m "$(cat /path/to/logfile.log)"

Awesome, it works 🙂

Thanks

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.