initial commit of the sludge fest application using protonmail to do the

emailing with nodemailer
This commit is contained in:
2026-04-02 23:10:53 -05:00
parent b47c7a51b4
commit cd8b0a913e
6 changed files with 549 additions and 171 deletions
+41
View File
@@ -0,0 +1,41 @@
export async function load({ }) {
console.log("sludge fest application")
}
export const actions = {
default: async ({ request }) => {
let data = await request.formData();
console.log("apply", data);
transporter.sendMail({
from: SMTP_USERNAME,
to: "fuckyou@sludge.link",
subject: "This is a test",
html: `
<!DOCTYPE html>
<html>
<body>
<h1>Hello email</h1 >
</body>
</html
`
}, (error, info) => {
if (error) {
console.error("Error sending email:", error);
} else {
console.log("Email sent successfully:", info.response);
}
})
}
}
import { SMTP_TOKEN, SMTP_USERNAME } from '$env/static/private'
import nodemailer from "nodemailer"
const transporter = nodemailer.createTransport({
service: "Proton",
auth: {
user: SMTP_USERNAME,
pass: SMTP_TOKEN
},
authMethod: "PLAIN"
} as nodemailer.TransportOptions)