1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { mail } from "https://esm.town/v/kognise/mail";
export async function sendDailyValenceEmail() {
await mail({
to: "Lexi Mattick <lexi.mattick@gmail.com>",
from: "Valence Tracker <kognise.onValenceReply@valtown.email>",
subject: "daily happiness check-in",
text: `
hello, me! this is your daily reminder to rate your happiness. you can do this any time today.
1 - terrible
2 - pretty bad
3 - meh
4 - pretty good
5 - fantastic
as always, just reply with a relevant number.
`.trim(),
});
}
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.