1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-07-01 23:20:13 +02:00

feat: custom mail subject

This commit is contained in:
Elias Schneider 2022-12-23 10:57:09 +01:00
parent aac363bb37
commit cabaee588b
2 changed files with 11 additions and 3 deletions

View File

@ -69,9 +69,17 @@ const configVariables: Prisma.ConfigCreateInput[] = [
},
{
key: "EMAIL_MESSAGE",
description: "Message which gets sent to the recipients. {creator} and {shareUrl} will be replaced with the creator's name and the share URL.",
description:
"Message which gets sent to the recipients. {creator} and {shareUrl} will be replaced with the creator's name and the share URL.",
type: "text",
value: "Hey!\n{creator} shared some files with you. View or download the files with this link: {shareUrl}\nShared securely with Pingvin Share 🐧",
value:
"Hey!\n{creator} shared some files with you. View or download the files with this link: {shareUrl}\nShared securely with Pingvin Share 🐧",
},
{
key: "EMAIL_SUBJECT",
description: "Subject of the email which gets sent to the recipients.",
type: "string",
value: "Files shared with you",
},
{
key: "SMTP_HOST",

View File

@ -27,7 +27,7 @@ export class EmailService {
await transporter.sendMail({
from: `"Pingvin Share" <${this.config.get("SMTP_EMAIL")}>`,
to: recipientEmail,
subject: "Files shared with you",
subject: this.config.get("EMAIL_SUBJECT"),
text: this.config
.get("EMAIL_MESSAGE")
.replaceAll("\\n", "\n")