mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-10-02 01:20:11 +02:00
feat: custom mail subject
This commit is contained in:
parent
aac363bb37
commit
cabaee588b
@ -69,9 +69,17 @@ const configVariables: Prisma.ConfigCreateInput[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "EMAIL_MESSAGE",
|
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",
|
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",
|
key: "SMTP_HOST",
|
||||||
|
@ -27,7 +27,7 @@ export class EmailService {
|
|||||||
await transporter.sendMail({
|
await transporter.sendMail({
|
||||||
from: `"Pingvin Share" <${this.config.get("SMTP_EMAIL")}>`,
|
from: `"Pingvin Share" <${this.config.get("SMTP_EMAIL")}>`,
|
||||||
to: recipientEmail,
|
to: recipientEmail,
|
||||||
subject: "Files shared with you",
|
subject: this.config.get("EMAIL_SUBJECT"),
|
||||||
text: this.config
|
text: this.config
|
||||||
.get("EMAIL_MESSAGE")
|
.get("EMAIL_MESSAGE")
|
||||||
.replaceAll("\\n", "\n")
|
.replaceAll("\\n", "\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user