-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
async email sending + more improvements to content
- Loading branch information
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,16 +113,22 @@ export async function action({ context, request }: ActionFunctionArgs) { | |
reason = payload?.reason; | ||
} | ||
|
||
await sendEmail({ | ||
void sendEmail({ | ||
to: ADMIN_EMAIL || "[email protected]", | ||
subject: "Delete account request", | ||
text: `User with id ${userId} and email ${payload.email} has requested to delete their account. \n\n Reason: ${reason}`, | ||
text: `User with id ${userId} and email ${payload.email} has requested to delete their account. \n\n Reason: ${reason}\n\n`, | ||
}); | ||
|
||
void sendEmail({ | ||
to: payload.email, | ||
subject: "Delete account request received", | ||
text: `We have received your request to delete your account. It will be processed within 72 hours.\n\n Kind regards,\nthe Shelf team \n\n`, | ||
}); | ||
|
||
sendNotification({ | ||
title: "Account deletion request", | ||
message: | ||
"Your request has been sent to the admin and will be processed within 24 hours.", | ||
"Your request has been sent to the admin and will be processed within 24 hours. You will receive an email confirmation.", | ||
icon: { name: "success", variant: "success" }, | ||
senderId: authSession.userId, | ||
}); | ||
|