From 9a875920ac8c45e65359f32b82e738f4ab5ca9d9 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 29 Aug 2021 12:35:55 -0700 Subject: [PATCH] chore: Remove 'attachments' option from mailer --- server/__snapshots__/mailer.test.js.snap | 1 - server/mailer.js | 17 ++--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/server/__snapshots__/mailer.test.js.snap b/server/__snapshots__/mailer.test.js.snap index b6741b22..0fe55cf9 100644 --- a/server/__snapshots__/mailer.test.js.snap +++ b/server/__snapshots__/mailer.test.js.snap @@ -2,7 +2,6 @@ exports[`Mailer #welcome 1`] = ` Object { - "attachments": undefined, "from": "hello@example.com", "html": " diff --git a/server/mailer.js b/server/mailer.js index a5a36eac..a81fb580 100644 --- a/server/mailer.js +++ b/server/mailer.js @@ -47,7 +47,6 @@ export type EmailSendOptions = { text: string, html: React.Node, headCSS?: string, - attachments?: Object[], }; /** @@ -137,7 +136,6 @@ export class Mailer { subject: data.title, html: html, text: data.text, - attachments: data.attachments, }); if (useTestEmailService) { @@ -163,15 +161,9 @@ export class Mailer { }); }; - exportSuccess = async (opts: { - to: string, - attachments?: Object[], - id: string, - teamUrl: string, - }) => { + exportSuccess = async (opts: { to: string, id: string, teamUrl: string }) => { this.sendMail({ to: opts.to, - attachments: opts.attachments, title: "Your requested export", previewText: "Here's your request data export from Outline", html: , @@ -179,14 +171,9 @@ export class Mailer { }); }; - exportFailure = async (opts: { - to: string, - attachments?: Object[], - teamUrl: string, - }) => { + exportFailure = async (opts: { to: string, teamUrl: string }) => { this.sendMail({ to: opts.to, - attachments: opts.attachments, title: "Your requested export", previewText: "Sorry, your requested data export has failed", html: ,