Closed Caedis closed 2 years ago
Hello! Thanks for the contribution!
Space fixes are minor but definitely appreciated.
What is the goal of the user script? To use an external notification system? Can you provide some real life examples?
The user can already configure a different mail binary in the config file.
While being able to change the mail binary, you can not change the parameters that is passed to it, so you would have to use something that works with everything that is passed in.
An example would be:
HOOK_NOTIFICATION="$CURRENT_DIR/email_script.sh"
email_script.sh:
curl -s --user 'api:my_api_key' \
https://api.mailgun.net/v3/my_domain/messages \
-F from=from_address \
-F to=to_address \
-F subject="$1" \
-F text="$2"
need to make a couple changes
While being able to change the mail binary, you can not change the parameters that is passed to it, so you would have to use something that works with everything that is passed in.
An example would be:
HOOK_NOTIFICATION="$CURRENT_DIR/email_script.sh"
email_script.sh:
Allright, It makes sense now :)
need to make a couple changes
No problem. Let me know when ready
Feel free to make any changes before merging
@Caedis I merged a PR created before yours. These are small changes and they do not interfere with yours, but there are some conflicts according to GitHub. Can you rebase your changes based on the current versions? I won't make other changes, I promise!
Can do
There we go....i need more experience with rebasing
Looks good now!
The from address addition is straight forward.
The user-created script gets the subject and body (in that order) so that the user can do whatever they want with it and without editing the main script.
Sorry for the whitespace fixes, if needed, I can diff and patch them out.