Fix email sending not working

This commit is contained in:
regalijan 2023-10-19 16:50:41 -04:00
parent eb550a7c36
commit 056c6b84f3
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ export async function onRequestPost(context: RequestContext) {
const { appeal } = context.data;
const body = new FormData();
body.append("from", "noreply@mail.carcrushers.cc");
body.append("to", appeal.email);
body.append("to", appeal.user.email);
body.append("subject", "Appeal Accepted");
body.append("template", "appeal_accepted");
body.append("v:note", context.data.body.feedback || "No note provided.");
@ -51,7 +51,7 @@ export async function onRequestPost(context: RequestContext) {
{
title: "Appeal Accepted",
color: 0x00ff00,
description: `Appeal from user ${appeal.username} (${appeal.id}) was accepted.`,
description: `Appeal from user ${appeal.user.username} (${appeal.user.id}) was accepted.`,
fields: [
{
name: "Moderator",

View File

@ -2,7 +2,7 @@ export async function onRequestPost(context: RequestContext) {
const { appeal } = context.data;
const body = new FormData();
body.append("from", "noreply@mail.carcrushers.cc");
body.append("to", appeal.email);
body.append("to", appeal.user.email);
body.append("subject", "Appeal Denied");
body.append("template", "appeal_denied");
body.append("v:note", context.data.body.feedback || "No note provided.");
@ -40,7 +40,7 @@ export async function onRequestPost(context: RequestContext) {
{
title: "Appeal Denied",
color: 0xff0000,
description: `Appeal from user ${appeal.username} (${appeal.id}) was denied.`,
description: `Appeal from user ${appeal.user.username} (${appeal.user.id}) was denied.`,
fields: [
{
name: "Moderator",