Readme

Receive an email to a val

Every function val can be send an email: username.valname@valtown.email

This val's email address is: stevekrouse.testEmail@valtown.email

It will be called with the first argument as the email.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { email } from "https://esm.town/v/std/email?v=9";
import { testEmails } from "https://esm.town/v/stevekrouse/testEmails";
export function testEmail(e: {
from: string;
to: string[];
subject: string;
text: string;
html: string;
}) {
testEmails.push({ ...e, from: "~redacted~" });
return email({
text: JSON.stringify(e),
subject: "Emailed received at @stevekrouse.testEmail!",
});
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
1
stevekrouse avatar

you can now leave comments on vals!!

October 23, 2023