Skip to content

Scheduling infrastructure for absolutely everyone.

chore: clean up and fix images (#1224)

Mihai C80a2b6c0687f
diff --git a/ee/pages/api/integrations/stripepayment/webhook.ts b/ee/pages/api/integrations/stripepayment/webhook.ts
index 64a87e8e6f9..459db97f299 100644
--- a/ee/pages/api/integrations/stripepayment/webhook.ts
+++ b/ee/pages/api/integrations/stripepayment/webhook.ts
@@ -5,6 +5,7 @@ import Stripe from "stripe";
import stripe from "@ee/lib/stripe/server";
import { CalendarEvent } from "@lib/calendarClient";
+import { IS_PRODUCTION } from "@lib/config/constants";
import { HttpError } from "@lib/core/http/error";
import { getErrorFromUnknown } from "@lib/errors";
import EventManager from "@lib/events/EventManager";
@@ -145,7 +146,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
console.error(`Webhook Error: ${err.message}`);
res.status(err.statusCode ?? 500).send({
message: err.message,
- stack: process.env.NODE_ENV === "production" ? undefined : err.stack,
+ stack: IS_PRODUCTION ? undefined : err.stack,
});
return;
}
diff --git a/lib/config/constants.ts b/lib/config/constants.ts
index da7099b61b5..b686c6f7dab 100644
--- a/lib/config/constants.ts
+++ b/lib/config/constants.ts
@@ -1 +1,2 @@
export const BASE_URL = process.env.BASE_URL || `https://${process.env.VERCEL_URL}`;
+export const IS_PRODUCTION = process.env.NODE_ENV === "production";
diff --git a/lib/emails/templates/attendee-awaiting-payment-email.ts b/lib/emails/templates/attendee-awaiting-payment-email.ts
index c5c3404b283..e9215e062a5 100644
--- a/lib/emails/templates/attendee-awaiting-payment-email.ts
+++ b/lib/emails/templates/attendee-awaiting-payment-email.ts
@@ -5,8 +5,14 @@ import toArray from "dayjs/plugin/toArray";
import utc from "dayjs/plugin/utc";
import AttendeeScheduledEmail from "./attendee-scheduled-email";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+ linkIcon,
+} from "./common";
dayjs.extend(utc);
dayjs.extend(timezone);
@@ -66,66 +72,11 @@ ${this.getAdditionalNotes()}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("calendarCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "meeting_awaiting_payment"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "emailed_you_and_any_other_attendees"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("meeting_awaiting_payment"),
+ this.calEvent.language("emailed_you_and_any_other_attendees")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -156,33 +107,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -214,40 +139,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
@@ -263,7 +155,9 @@ ${this.getAdditionalNotes()}
<tr>
<td align="center" bgcolor="#292929" role="presentation" style="border:none;border-radius:3px;cursor:auto;mso-padding-alt:10px 25px;background:#292929;" valign="middle">
<p style="display:inline-block;background:#292929;color:#ffffff;font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:500;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px 25px;mso-padding-alt:0px;border-radius:3px;">
- <a style="color: #FFFFFF; text-decoration: none;" href="${this.calEvent.paymentInfo.link}" target="_blank">${manageText} <img src="https://i.imgur.com/rKsIBcc.png" width="12px"></img></a>
+ <a style="color: #FFFFFF; text-decoration: none;" href="${
+ this.calEvent.paymentInfo.link
+ }" target="_blank">${manageText} <img src="${linkIcon()}" width="12px"></img></a>
</p>
</td>
</tr>
diff --git a/lib/emails/templates/attendee-cancelled-email.ts b/lib/emails/templates/attendee-cancelled-email.ts
index 8f42eaf5a8e..55449e0a2a2 100644
--- a/lib/emails/templates/attendee-cancelled-email.ts
+++ b/lib/emails/templates/attendee-cancelled-email.ts
@@ -5,8 +5,13 @@ import toArray from "dayjs/plugin/toArray";
import utc from "dayjs/plugin/utc";
import AttendeeScheduledEmail from "./attendee-scheduled-email";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+} from "./common";
dayjs.extend(utc);
dayjs.extend(timezone);
@@ -67,66 +72,11 @@ ${this.getAdditionalNotes()}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("xCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "event_request_cancelled"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "emailed_you_and_any_other_attendees"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("event_request_cancelled"),
+ this.calEvent.language("emailed_you_and_any_other_attendees")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -169,40 +119,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
diff --git a/lib/emails/templates/attendee-declined-email.ts b/lib/emails/templates/attendee-declined-email.ts
index 34dc3576ea1..78afb3dfb40 100644
--- a/lib/emails/templates/attendee-declined-email.ts
+++ b/lib/emails/templates/attendee-declined-email.ts
@@ -5,8 +5,13 @@ import toArray from "dayjs/plugin/toArray";
import utc from "dayjs/plugin/utc";
import AttendeeScheduledEmail from "./attendee-scheduled-email";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+} from "./common";
dayjs.extend(utc);
dayjs.extend(timezone);
@@ -67,66 +72,11 @@ ${this.getAdditionalNotes()}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("xCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "event_request_declined"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "emailed_you_and_any_other_attendees"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("event_request_declined"),
+ this.calEvent.language("emailed_you_and_any_other_attendees")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -169,40 +119,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
diff --git a/lib/emails/templates/attendee-rescheduled-email.ts b/lib/emails/templates/attendee-rescheduled-email.ts
index 7756e1e83c6..4e39e1d3e9c 100644
--- a/lib/emails/templates/attendee-rescheduled-email.ts
+++ b/lib/emails/templates/attendee-rescheduled-email.ts
@@ -7,8 +7,13 @@ import utc from "dayjs/plugin/utc";
import { getCancelLink } from "@lib/CalEventParser";
import AttendeeScheduledEmail from "./attendee-scheduled-email";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+} from "./common";
dayjs.extend(utc);
dayjs.extend(timezone);
@@ -87,66 +92,11 @@ ${this.getAdditionalNotes()}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("calendarCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "event_has_been_rescheduled"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "emailed_you_and_any_other_attendees"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("event_has_been_rescheduled"),
+ this.calEvent.language("emailed_you_and_any_other_attendees")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -177,33 +127,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -230,40 +154,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
diff --git a/lib/emails/templates/attendee-scheduled-email.ts b/lib/emails/templates/attendee-scheduled-email.ts
index 861d25232ba..eabe008f9de 100644
--- a/lib/emails/templates/attendee-scheduled-email.ts
+++ b/lib/emails/templates/attendee-scheduled-email.ts
@@ -12,8 +12,14 @@ import { getErrorFromUnknown } from "@lib/errors";
import { getIntegrationName } from "@lib/integrations";
import { serverConfig } from "@lib/serverConfig";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+ linkIcon,
+} from "./common";
dayjs.extend(utc);
dayjs.extend(timezone);
@@ -156,66 +162,11 @@ ${this.getAdditionalNotes()}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("checkCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "your_event_has_been_scheduled"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "emailed_you_and_any_other_attendees"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("your_event_has_been_scheduled"),
+ this.calEvent.language("emailed_you_and_any_other_attendees")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -246,33 +197,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -299,40 +224,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
@@ -438,7 +330,7 @@ ${this.getAdditionalNotes()}
meetingUrl &&
`<a href="${meetingUrl}" target="_blank" alt="${this.calEvent.language(
"meeting_url"
- )}"><img src="https://i.imgur.com/rKsIBcc.png" width="12px"></img></a>`
+ )}"><img src="${linkIcon()}" width="12px"></img></a>`
}</p>
${
meetingId &&
@@ -475,7 +367,7 @@ ${this.getAdditionalNotes()}
hangoutLink &&
`<a href="${hangoutLink}" target="_blank" alt="${this.calEvent.language(
"meeting_url"
- )}"><img src="https://i.imgur.com/rKsIBcc.png" width="12px"></img></a>`
+ )}"><img src="${linkIcon()}" width="12px"></img></a>`
}</p>
<div style="color: #494949; font-weight: 400; line-height: 24px;"><a href="${hangoutLink}" alt="${this.calEvent.language(
"meeting_url"
diff --git a/lib/emails/templates/common/body-logo.ts b/lib/emails/templates/common/body-logo.ts
new file mode 100644
index 00000000000..5d816b13b38
--- /dev/null
+++ b/lib/emails/templates/common/body-logo.ts
@@ -0,0 +1,42 @@
+import { IS_PRODUCTION, BASE_URL } from "@lib/config/constants";
+
+export const emailBodyLogo = (): string => {
+ const image = IS_PRODUCTION ? BASE_URL + "emails/[email protected]" : "https://i.imgur.com/esapZ47.png";
+
+ return `
+ <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
+ <div style="margin:0px auto;max-width:600px;">
+ <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
+ <tbody>
+ <tr>
+ <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
+ <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
+ <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
+ <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
+ <tbody>
+ <tr>
+ <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
+ <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
+ <tbody>
+ <tr>
+ <td style="width:89px;">
+ <a href="${BASE_URL}" target="_blank">
+ <img height="19" src="${image}" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
+ </a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <!--[if mso | IE]></td></tr></table><![endif]-->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ `;
+};
diff --git a/lib/emails/templates/common/index.ts b/lib/emails/templates/common/index.ts
new file mode 100644
index 00000000000..686d871f91e
--- /dev/null
+++ b/lib/emails/templates/common/index.ts
@@ -0,0 +1,6 @@
+export { emailHead } from "./head";
+export { emailSchedulingBodyHeader } from "./scheduling-body-head";
+export { emailBodyLogo } from "./body-logo";
+export { emailScheduledBodyHeaderContent } from "./scheduling-body-head-content";
+export { emailSchedulingBodyDivider } from "./scheduling-body-divider";
+export { linkIcon } from "./link-icon";
diff --git a/lib/emails/templates/common/link-icon.ts b/lib/emails/templates/common/link-icon.ts
new file mode 100644
index 00000000000..52ffb74bf3a
--- /dev/null
+++ b/lib/emails/templates/common/link-icon.ts
@@ -0,0 +1,5 @@
+import { IS_PRODUCTION, BASE_URL } from "@lib/config/constants";
+
+export const linkIcon = (): string => {
+ return IS_PRODUCTION ? BASE_URL + "/emails/linkIcon.png" : "https://i.imgur.com/rKsIBcc.png";
+};
diff --git a/lib/emails/templates/common/scheduling-body-divider.ts b/lib/emails/templates/common/scheduling-body-divider.ts
new file mode 100644
index 00000000000..b8723c3e7b7
--- /dev/null
+++ b/lib/emails/templates/common/scheduling-body-divider.ts
@@ -0,0 +1,31 @@
+export const emailSchedulingBodyDivider = (): string => {
+ return `
+ <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
+ <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
+ <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
+ <tbody>
+ <tr>
+ <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
+ <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
+ <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
+ <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
+ <tbody>
+ <tr>
+ <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
+ <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
+ </p>
+ <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
+</td></tr></table><![endif]-->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <!--[if mso | IE]></td></tr></table><![endif]-->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ `;
+};
diff --git a/lib/emails/templates/common/scheduling-body-head-content.ts b/lib/emails/templates/common/scheduling-body-head-content.ts
new file mode 100644
index 00000000000..31515fc760b
--- /dev/null
+++ b/lib/emails/templates/common/scheduling-body-head-content.ts
@@ -0,0 +1,33 @@
+export const emailScheduledBodyHeaderContent = (title: string, subtitle: string): string => {
+ return `
+ <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
+ <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
+ <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
+ <tbody>
+ <tr>
+ <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
+ <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
+ <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
+ <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
+ <tbody>
+ <tr>
+ <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
+ <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${title}</div>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
+ <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${subtitle}</div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <!--[if mso | IE]></td></tr></table><![endif]-->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ `;
+};
diff --git a/lib/emails/templates/common/scheduling-body-head.ts b/lib/emails/templates/common/scheduling-body-head.ts
index 1d243e4a694..56f80cce3fd 100644
--- a/lib/emails/templates/common/scheduling-body-head.ts
+++ b/lib/emails/templates/common/scheduling-body-head.ts
@@ -1,19 +1,15 @@
-const isProduction = process.env.NODE_ENV === "production";
+import { IS_PRODUCTION, BASE_URL } from "@lib/config/constants";
export type BodyHeadType = "checkCircle" | "xCircle" | "calendarCircle";
-export const getHeadImage = (headerType: BodyHeadType) => {
+export const getHeadImage = (headerType: BodyHeadType): string => {
switch (headerType) {
case "checkCircle":
- return isProduction
- ? "https://www.cal.com/emails/[email protected]"
- : "https://i.imgur.com/6BHFgjS.png";
+ return IS_PRODUCTION ? BASE_URL + "/emails/[email protected]" : "https://i.imgur.com/6BHFgjS.png";
case "xCircle":
- return isProduction ? "https://www.cal.com/emails/[email protected]" : "https://i.imgur.com/44Dq2je.png";
+ return IS_PRODUCTION ? BASE_URL + "/emails/[email protected]" : "https://i.imgur.com/44Dq2je.png";
case "calendarCircle":
- return isProduction
- ? "https://www.cal.com/emails/[email protected]"
- : "https://i.imgur.com/aQOp1mm.png";
+ return IS_PRODUCTION ? BASE_URL + "/emails/[email protected]" : "https://i.imgur.com/aQOp1mm.png";
}
};
diff --git a/lib/emails/templates/forgot-password-email.ts b/lib/emails/templates/forgot-password-email.ts
index 803abe6170e..7bd0e02497a 100644
--- a/lib/emails/templates/forgot-password-email.ts
+++ b/lib/emails/templates/forgot-password-email.ts
@@ -4,7 +4,7 @@ import nodemailer from "nodemailer";
import { getErrorFromUnknown } from "@lib/errors";
import { serverConfig } from "@lib/serverConfig";
-import { emailHead } from "./common/head";
+import { emailHead, linkIcon, emailBodyLogo } from "./common";
export type PasswordReset = {
language: TFunction;
@@ -83,40 +83,7 @@ ${this.passwordEvent.language("have_any_questions")} ${this.passwordEvent.langua
${emailHead(headerContent)}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
@@ -175,7 +142,7 @@ ${this.passwordEvent.language("have_any_questions")} ${this.passwordEvent.langua
this.passwordEvent.resetLink
}" target="_blank" style="color: #FFFFFF; text-decoration: none">${this.passwordEvent.language(
"change_password"
- )} <img src="https://i.imgur.com/rKsIBcc.png" width="12px"></img></a>
+ )} <img src="${linkIcon()}" width="12px"></img></a>
</p>
</td>
</tr>
@@ -244,7 +211,6 @@ ${this.passwordEvent.language("have_any_questions")} ${this.passwordEvent.langua
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
-
</html>
`;
}
diff --git a/lib/emails/templates/organizer-cancelled-email.ts b/lib/emails/templates/organizer-cancelled-email.ts
index c9ea05672e8..4845b8010a1 100644
--- a/lib/emails/templates/organizer-cancelled-email.ts
+++ b/lib/emails/templates/organizer-cancelled-email.ts
@@ -4,8 +4,13 @@ import timezone from "dayjs/plugin/timezone";
import toArray from "dayjs/plugin/toArray";
import utc from "dayjs/plugin/utc";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+} from "./common";
import OrganizerScheduledEmail from "./organizer-scheduled-email";
dayjs.extend(utc);
@@ -75,66 +80,11 @@ ${this.getAdditionalNotes()}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("xCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "event_request_cancelled"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "emailed_you_and_any_other_attendees"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("event_request_cancelled"),
+ this.calEvent.language("emailed_you_and_any_other_attendees")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -177,40 +127,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
diff --git a/lib/emails/templates/organizer-payment-refund-failed-email.ts b/lib/emails/templates/organizer-payment-refund-failed-email.ts
index 31a53582c37..2b97296fee0 100644
--- a/lib/emails/templates/organizer-payment-refund-failed-email.ts
+++ b/lib/emails/templates/organizer-payment-refund-failed-email.ts
@@ -4,8 +4,7 @@ import timezone from "dayjs/plugin/timezone";
import toArray from "dayjs/plugin/toArray";
import utc from "dayjs/plugin/utc";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import { emailHead, emailSchedulingBodyHeader, emailBodyLogo, emailSchedulingBodyDivider } from "./common";
import OrganizerScheduledEmail from "./organizer-scheduled-email";
dayjs.extend(utc);
@@ -115,33 +114,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -184,40 +157,7 @@ ${this.getAdditionalNotes()}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
diff --git a/lib/emails/templates/organizer-request-email.ts b/lib/emails/templates/organizer-request-email.ts
index 499fd154b25..e0e30beceb5 100644
--- a/lib/emails/templates/organizer-request-email.ts
+++ b/lib/emails/templates/organizer-request-email.ts
@@ -4,8 +4,14 @@ import timezone from "dayjs/plugin/timezone";
import toArray from "dayjs/plugin/toArray";
import utc from "dayjs/plugin/utc";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+ linkIcon,
+} from "./common";
import OrganizerScheduledEmail from "./organizer-scheduled-email";
dayjs.extend(utc);
@@ -78,66 +84,11 @@ ${process.env.BASE_URL} + "/bookings/upcoming"
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("calendarCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "event_awaiting_approval"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "someone_requested_an_event"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("event_awaiting_approval"),
+ this.calEvent.language("someone_requested_an_event")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -168,33 +119,7 @@ ${process.env.BASE_URL} + "/bookings/upcoming"
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -232,40 +157,7 @@ ${process.env.BASE_URL} + "/bookings/upcoming"
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
@@ -276,6 +168,6 @@ ${process.env.BASE_URL} + "/bookings/upcoming"
protected getManageLink(): string {
const manageText = this.calEvent.language("confirm_or_reject_request");
const manageLink = process.env.BASE_URL + "/bookings/upcoming";
- return `<a style="color: #FFFFFF; text-decoration: none;" href="${manageLink}" target="_blank">${manageText} <img src="https://i.imgur.com/rKsIBcc.png" width="12px"></img></a>`;
+ return `<a style="color: #FFFFFF; text-decoration: none;" href="${manageLink}" target="_blank">${manageText} <img src="${linkIcon()}" width="12px"></img></a>`;
}
}
diff --git a/lib/emails/templates/organizer-request-reminder-email.ts b/lib/emails/templates/organizer-request-reminder-email.ts
index 139bde8989a..2094cf5c9ed 100644
--- a/lib/emails/templates/organizer-request-reminder-email.ts
+++ b/lib/emails/templates/organizer-request-reminder-email.ts
@@ -4,8 +4,14 @@ import timezone from "dayjs/plugin/timezone";
import toArray from "dayjs/plugin/toArray";
import utc from "dayjs/plugin/utc";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+ linkIcon,
+} from "./common";
import OrganizerScheduledEmail from "./organizer-scheduled-email";
dayjs.extend(utc);
@@ -77,66 +83,11 @@ ${process.env.BASE_URL} + "/bookings/upcoming"
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("calendarCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "event_still_awaiting_approval"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "someone_requested_an_event"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("event_still_awaiting_approval"),
+ this.calEvent.language("someone_requested_an_event")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -167,33 +118,7 @@ ${process.env.BASE_URL} + "/bookings/upcoming"
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -231,40 +156,7 @@ ${process.env.BASE_URL} + "/bookings/upcoming"
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
@@ -275,6 +167,6 @@ ${process.env.BASE_URL} + "/bookings/upcoming"
protected getManageLink(): string {
const manageText = this.calEvent.language("confirm_or_reject_request");
const manageLink = process.env.BASE_URL + "/bookings/upcoming";
- return `<a style="color: #FFFFFF; text-decoration: none;" href="${manageLink}" target="_blank">${manageText} <img src="https://i.imgur.com/rKsIBcc.png" width="12px"></img></a>`;
+ return `<a style="color: #FFFFFF; text-decoration: none;" href="${manageLink}" target="_blank">${manageText} <img src="${linkIcon()}" width="12px"></img></a>`;
}
}
diff --git a/lib/emails/templates/organizer-rescheduled-email.ts b/lib/emails/templates/organizer-rescheduled-email.ts
index fd298500349..d732cca666d 100644
--- a/lib/emails/templates/organizer-rescheduled-email.ts
+++ b/lib/emails/templates/organizer-rescheduled-email.ts
@@ -6,8 +6,13 @@ import utc from "dayjs/plugin/utc";
import { getCancelLink } from "@lib/CalEventParser";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+} from "./common";
import OrganizerScheduledEmail from "./organizer-scheduled-email";
dayjs.extend(utc);
@@ -83,66 +88,11 @@ ${getCancelLink(this.calEvent)}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("calendarCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "event_has_been_rescheduled"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "emailed_you_and_any_other_attendees"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("event_has_been_rescheduled"),
+ this.calEvent.language("emailed_you_and_any_other_attendees")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -173,33 +123,7 @@ ${getCancelLink(this.calEvent)}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -226,40 +150,7 @@ ${getCancelLink(this.calEvent)}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
diff --git a/lib/emails/templates/organizer-scheduled-email.ts b/lib/emails/templates/organizer-scheduled-email.ts
index 9b031496df9..8b03dcf33ce 100644
--- a/lib/emails/templates/organizer-scheduled-email.ts
+++ b/lib/emails/templates/organizer-scheduled-email.ts
@@ -12,8 +12,14 @@ import { getErrorFromUnknown } from "@lib/errors";
import { getIntegrationName } from "@lib/integrations";
import { serverConfig } from "@lib/serverConfig";
-import { emailHead } from "./common/head";
-import { emailSchedulingBodyHeader } from "./common/scheduling-body-head";
+import {
+ emailHead,
+ emailSchedulingBodyHeader,
+ emailBodyLogo,
+ emailScheduledBodyHeaderContent,
+ emailSchedulingBodyDivider,
+ linkIcon,
+} from "./common";
dayjs.extend(utc);
dayjs.extend(timezone);
@@ -150,66 +156,11 @@ ${getCancelLink(this.calEvent)}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
${emailSchedulingBodyHeader("checkCircle")}
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:24px;padding-bottom:0px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:700;line-height:24px;text-align:center;color:#292929;">${this.calEvent.language(
- "new_event_scheduled"
- )}</div>
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
- <div style="font-family:Roboto, Helvetica, sans-serif;font-size:16px;font-weight:400;line-height:24px;text-align:center;color:#494949;">${this.calEvent.language(
- "emailed_you_and_any_other_attendees"
- )}</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:15px 0px 0 0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailScheduledBodyHeaderContent(
+ this.calEvent.language("new_event_scheduled"),
+ this.calEvent.language("emailed_you_and_any_other_attendees")
+ )}
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -240,33 +191,7 @@ ${getCancelLink(this.calEvent)}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
- <tbody>
- <tr>
- <td style="border-left:1px solid #E1E1E1;border-right:1px solid #E1E1E1;direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:598px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-bottom:15px;word-break:break-word;">
- <p style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:100%;">
- </p>
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #E1E1E1;font-size:1px;margin:0px auto;width:548px;" role="presentation" width="548px" ><tr><td style="height:0;line-height:0;"> &nbsp;
- </td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailSchedulingBodyDivider()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" bgcolor="#FFFFFF" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;">
@@ -293,40 +218,7 @@ ${getCancelLink(this.calEvent)}
</tbody>
</table>
</div>
- <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><![endif]-->
</div>
</body>
@@ -426,7 +318,7 @@ ${getCancelLink(this.calEvent)}
meetingUrl &&
`<a href="${meetingUrl}" target="_blank" alt="${this.calEvent.language(
"meeting_url"
- )}"><img src="https://i.imgur.com/rKsIBcc.png" width="12px"></img></a>`
+ )}"><img src="${linkIcon()}" width="12px"></img></a>`
}</p>
${
meetingId &&
@@ -463,7 +355,7 @@ ${getCancelLink(this.calEvent)}
hangoutLink &&
`<a href="${hangoutLink}" target="_blank" alt="${this.calEvent.language(
"meeting_url"
- )}"><img src="https://i.imgur.com/rKsIBcc.png" width="12px"></img></a>`
+ )}"><img src="${linkIcon()}" width="12px"></img></a>`
}</p>
<div style="color: #494949; font-weight: 400; line-height: 24px;"><a href="${hangoutLink}" alt="${this.calEvent.language(
"meeting_url"
diff --git a/lib/emails/templates/team-invite-email.ts b/lib/emails/templates/team-invite-email.ts
index 658f24ab752..90763d8a62f 100644
--- a/lib/emails/templates/team-invite-email.ts
+++ b/lib/emails/templates/team-invite-email.ts
@@ -4,7 +4,7 @@ import nodemailer from "nodemailer";
import { getErrorFromUnknown } from "@lib/errors";
import { serverConfig } from "@lib/serverConfig";
-import { emailHead } from "./common/head";
+import { emailHead, linkIcon, emailBodyLogo } from "./common";
export type TeamInvite = {
language: TFunction;
@@ -78,40 +78,7 @@ export default class TeamInviteEmail {
${emailHead(headerContent)}
<body style="word-spacing:normal;background-color:#F5F5F5;">
<div style="background-color:#F5F5F5;">
- <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
- <div style="margin:0px auto;max-width:600px;">
- <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
- <tbody>
- <tr>
- <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;">
- <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
- <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
- <tbody>
- <tr>
- <td align="center" style="font-size:0px;padding:10px 25px;padding-top:32px;word-break:break-word;">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
- <tbody>
- <tr>
- <td style="width:89px;">
- <a href="#" target="_blank">
- <img height="19" src="https://i.imgur.com/esapZ47.png" style="border:0;display:block;outline:none;text-decoration:none;height:19px;width:100%;font-size:13px;" width="89" />
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!--[if mso | IE]></td></tr></table><![endif]-->
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ ${emailBodyLogo()}
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
@@ -171,7 +138,7 @@ export default class TeamInviteEmail {
this.teamInviteEvent.joinLink
}" target="_blank" style="color: #FFFFFF; text-decoration: none">${this.teamInviteEvent.language(
"accept_invitation"
- )} <img src="https://i.imgur.com/rKsIBcc.png" width="12px"></img></a>
+ )} <img src="${linkIcon()}" width="12px"></img></a>
</p>
</td>
</tr>
diff --git a/lib/logger.ts b/lib/logger.ts
index a4ce3e7cbf7..ff1114ec62b 100644
--- a/lib/logger.ts
+++ b/lib/logger.ts
@@ -1,12 +1,12 @@
import { Logger } from "tslog";
-const isProduction = process.env.NODE_ENV === "production";
+import { IS_PRODUCTION } from "@lib/config/constants";
const logger = new Logger({
dateTimePattern: "hour:minute:second.millisecond timeZoneName",
displayFunctionName: false,
displayFilePath: "hidden",
- dateTimeTimezone: isProduction ? "utc" : Intl.DateTimeFormat().resolvedOptions().timeZone,
+ dateTimeTimezone: IS_PRODUCTION ? "utc" : Intl.DateTimeFormat().resolvedOptions().timeZone,
prettyInspectHighlightStyles: {
name: "yellow",
number: "blue",
@@ -14,7 +14,7 @@ const logger = new Logger({
boolean: "blue",
},
maskValuesOfKeys: ["password", "passwordConfirmation", "credentials", "credential"],
- exposeErrorCodeFrame: !isProduction,
+ exposeErrorCodeFrame: !IS_PRODUCTION,
});
export default logger;
diff --git a/lib/prisma.ts b/lib/prisma.ts
index 1cb7589397f..0a6cf581809 100644
--- a/lib/prisma.ts
+++ b/lib/prisma.ts
@@ -1,5 +1,7 @@
import { PrismaClient } from "@prisma/client";
+import { IS_PRODUCTION } from "@lib/config/constants";
+
declare global {
// eslint-disable-next-line no-var
var prisma: PrismaClient | undefined;
@@ -11,7 +13,7 @@ export const prisma =
log: ["query", "error", "warn"],
});
-if (process.env.NODE_ENV !== "production") {
+if (!IS_PRODUCTION) {
globalThis.prisma = prisma;
}
diff --git a/public/emails/[email protected] b/public/emails/[email protected]
new file mode 100644
index 00000000000..d22c77e2e11
Binary files /dev/null and b/public/emails/[email protected] differ
diff --git a/public/emails/linkIcon.png b/public/emails/linkIcon.png
new file mode 100644
index 00000000000..a07de652032
Binary files /dev/null and b/public/emails/linkIcon.png differ