1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { email } from "https://esm.town/v/std/email?v=9";
import { valTownInspoList } from "https://esm.town/v/rodrigotello/valTownInspoList";
export const valTownInspirationEmail = async () => {
let subject = "Daily Val Town inspiration";
let valTownInspo =
valTownInspoList[
Math.floor(
Math.random() * valTownInspoList.length,
)
];
let html = `<h1>${valTownInspo.title}</h1>
<p>${valTownInspo.description}</p>
<a href="https://val.town/${valTownInspo.val}"><img src="${valTownInspo.image}" style="max-width:576px"/></a>
<p>
</p>
<p>You're getting this email because you scheduled Val Town daily
inspiration during the onboarding tutorial. <a href="https://www.val.town/settings/intervals">
Unsubscribe here</a>.
</p>`;
await email({ html, subject });
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023