Mail and text messages

The settings on the shop PC that let the day's figures reach the owner by e-mail and by SMS through Hubtel.
This page is for whoever installs and looks after the shop PC, and uses the words of that job. It is not in the guide's menu on purpose; the owner's pages on the same subjects are under Looking after the shop.

The figures go out by two channels, each set up once in the settings file on the PC, C:\ProgramData\Chemistbook\settings\chemistbook.yaml. Either can be left out; a summary then records not set up for that channel and is still kept. Firmitek sets both up at install; this page is for the owner who wants to know what is on the machine, or to change a setting later.

The file is in a folder only Windows, the administrators and the Chemistbook service may open: open it with Notepad run as administrator. It already holds what the installer wrote (the backup passphrase, the off-site folder and the key for two-factor sign-in); the settings below go into the same file, under the same otcms: at the left edge, never in a second one.

E-mail

Any mailbox that offers SMTP will do: the shop's Gmail or Outlook account, or a mailbox from the shop's web host.

spring:
  mail:
    host: smtp.gmail.com
    port: 587
    username: shop@example.com
    password: "an-app-password"
    properties:
      "[mail.smtp.auth]": true
      "[mail.smtp.starttls.enable]": true
otcms:
  reports:
    from: shop@example.com
    always-to: owner@example.com
  • from is the address the figures come from. Leaving it out turns e-mail off.
  • always-to is optional: an address that receives every summary in addition to the owners' own, say the accountant.
With Gmail, create an app password for the shop PC rather than typing the account's real password: Google Account → Security → App passwords. It can be revoked without changing the account's password.

Text messages

Text messages go through Hubtel, a Ghanaian SMS gateway. The shop, or Firmitek on its behalf, holds a Hubtel account with a sender ID (the name that appears on the phone, up to eleven characters) and a client ID and secret.

otcms:
  sms:
    hubtel:
      client-id: "…"
      client-secret: "…"
      sender-id: "…"

All three are needed for the channel to be on. Each text costs about GH₵0.03 from the Hubtel balance: roughly GH₵1 a month for one owner, and about GH₵3 at worst (Messages to the owner has the sums). Top the balance up on Hubtel's site.

Who receives

Every enabled person with the Owner / Admin role, at the e-mail and phone on their account, plus the shop's e-mail and phone from Compliance. Phone numbers are Ghanaian: 024 000 0000 and +233 24 000 0000 are the same number.

Changing a setting

Save the file, then restart the service: in Services, right-click Chemistbook and choose Restart, or in PowerShell run as administrator:

Restart-Service chemistbook

The till is off for the few seconds it takes. Then send a past day again from Sales by day and check its delivery under Sales summaries. A setting the service cannot read stops it from starting, and its log in C:\ProgramData\Chemistbook\logs says which line.

The settings file holds passwords. It stays on the PC and it is never e-mailed. It is not inside the backups: keep a copy of it, or of what is in it, in the same drawer as the licence, so a new PC can be set up the same way.