chore: Remove 'attachments' option from mailer

This commit is contained in:
Tom Moor 2021-08-29 12:35:55 -07:00
parent f389ac6414
commit 9a875920ac
2 changed files with 2 additions and 16 deletions

View File

@ -2,7 +2,6 @@
exports[`Mailer #welcome 1`] = `
Object {
"attachments": undefined,
"from": "hello@example.com",
"html": "
<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Strict//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\">

View File

@ -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: <ExportSuccessEmail id={opts.id} teamUrl={opts.teamUrl} />,
@ -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: <ExportFailureEmail teamUrl={opts.teamUrl} />,