Readme

Unlimited Anonymous Emails

Create anonymous emails and forward their results to your inbox.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { encode } from "https://deno.land/std@0.203.0/encoding/base64.ts";
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=29";
import { AttachmentData, email } from "https://esm.town/v/std/email?v=13";
const { author, name } = extractValInfo(import.meta.url);
export async function forwarder(e: Email) {
let attachments: AttachmentData[] = [];
for (const f of e.attachments) {
attachments.push({
filename: f.name,
content: encode(await f.arrayBuffer()),
type: f.type,
disposition: "attachment",
});
}
console.log("Forwarding email:", e);
return email({
from: { name: e.from.split("<")[0], email: `${author}.${name}@valtown.email` },
html: e.html,
text: e.text,
subject: "Fwd:" + e.subject,
attachments,
replyTo: e.from,
});
}
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!
August 27, 2024