Expand description
Mail about money: a payment made or received, a bill, an order, a refund.
Read from the subject, then the start of the text, in French and English:
the payment is stated at the top, and footers say things like “vous avez
reçu ce message”. A detection only proposes a budget line; nothing counts
until a rule, or you, says so (docs/accounting.md). Newsletters, activity
reports and shipping notices are not payments. The words looked for are
the payments and money lists of the word packs in use, with your
changes (words::Payments, docs/words.md).
Structs§
- Payment
- What a message says about money.
Enums§
Constants§
- READ 🔒
- Characters of the text read: the payment is stated at the top.
Functions§
- detect
- What a message says about money, if it says something: subjects about
money that are no payment left out (
Payments::not_payments), then the phrases of each kind, tried in this order: a refund, a payment made, money received, an order, a bill (a receipt “pour votre paiement” must not be read as a payment received, nor the settlement of a bill as the bill). - kind_in 🔒
- labelled_
party 🔒 - Receipts set who was paid, or who paid, under a label: “Paiement à” then “Exemple Web”.
- order_
subject 🔒 - “Commande FR000000 confirmée”: the order and its confirmation, apart.
- party 🔒
- Who the payment went to or came from, in what follows its amount: “à Exemple
Retail.”, “en faveur de SHOP”, “de Jean Exemple (jean@example.org)”.
leads: the words before the name (Payments::leads), the longest tried first (“de la part de” before “de”), a space after each. - read
- The amount and the party, for a message known to be about money (a rule says so). The party comes from the sentence stating the payment, else from a receipt’s label (“Paiement à” and the name under it), else it is the sender.
- start
- The start of a message’s text, as
detectreads it.