summaryrefslogtreecommitdiff
path: root/utils/notify_short/config.pl
blob: cddda1e043e0f07570822190b014bd9ad4a40f8a (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 = "From: $email_from
  21. Subject: Parts Short Notice
  22. Hi. This is the SL-Short listener. You are receiving this message because
  23. a recently issued invoice has reduced the number of onhand items to a level
  24. below its re-order point (ROP). Please see the below report for items currently
  25. at or below their ROP.
  26. Partnumber Description Onhand ROP
  27. ---------------------------------------------------------------------
  28. ";
  29. $template_foot = "
  30. Thank you for your attention.";
  31. format MAIL_TOP =
  32. Partnumber Description Onhand ROP
  33. ---------------------------------------------------------------------
  34. .
  35. format MAIL =
  36. @<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>> @>>>>>
  37. $partnumber, $description, $avail,$rop
  38. .
  39. 1;