summaryrefslogtreecommitdiff
path: root/utils/notify_short/config.pl
blob: bd37bed18a5955dbacfea1f884bb2f3a52530fcc (plain)
  1. #!/usr/bin/perl
  2. use vars qw($email_to $cc_to $email_from $sendmail $database $db_user
  3. $db_passwd $template_head $template_foot);
  4. # The address to send the mail to. On UNIX systems, multiple addresses can be
  5. # separated by a space.
  6. $email_to = 'manager@example';
  7. # The email address this email is from:
  8. $email_from = 'noreply@example';
  9. # The comamnd for sending the email:
  10. $sendmail = "sendmail -f$email_from $email_to";
  11. # The database containing SQL-Ledger
  12. $database = "ledger-smb";
  13. # The user to connect with. This user only requires select permission to the
  14. # parts table.
  15. $db_user = "ls-short";
  16. # How long between checking for Notify events? In seconds
  17. $cycle_delay = 60;
  18. # The password for the db user:
  19. $db_passwd = "mypasswd";
  20. $template_top =
  21. "From: $email_from
  22. Subject: Parts Short Notice
  23. Hi. This is the SL-Short listener. You are receiving this message because
  24. a recently issued invoice has reduced the number of onhand items to a level
  25. below its re-order point (ROP). Please see the below report for items currently
  26. at or below their ROP.
  27. Partnumber Description Onhand ROP
  28. ---------------------------------------------------------------------
  29. ";
  30. $template_foot = "
  31. Thank you for your attention.";
  32. format MAIL_TOP =
  33. Partnumber Description Onhand ROP
  34. ---------------------------------------------------------------------
  35. .
  36. format MAIL =
  37. @<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>> @>>>>>
  38. $partnumber, $description, $avail,$rop
  39. .
  40. 1;