diff --git a/apps/webapp/public/emails/logo-triangle.png b/apps/webapp/public/emails/logo-triangle.png
new file mode 100644
index 0000000000..59ae39f5d8
Binary files /dev/null and b/apps/webapp/public/emails/logo-triangle.png differ
diff --git a/internal-packages/emails/emails/components/Footer.tsx b/internal-packages/emails/emails/components/Footer.tsx
index 00f128c8be..36ca0b03d8 100644
--- a/internal-packages/emails/emails/components/Footer.tsx
+++ b/internal-packages/emails/emails/components/Footer.tsx
@@ -1,14 +1,13 @@
-import { Hr, Link, Text } from "@react-email/components";
-import React from "react";
-import { footer, footerAnchor, hr } from "./styles";
+import { Hr, Link, Tailwind, Text } from "@react-email/components";
+import { hr } from "./styles";
export function Footer() {
return (
<>
-
+
©Trigger.dev, 1111B S Governors Ave STE 6433, Dover, DE 19904 |{" "}
-
+
Trigger.dev
diff --git a/internal-packages/emails/emails/components/styles.ts b/internal-packages/emails/emails/components/styles.ts
index 7e7db86621..1c9947de9d 100644
--- a/internal-packages/emails/emails/components/styles.ts
+++ b/internal-packages/emails/emails/components/styles.ts
@@ -26,7 +26,6 @@ export const box = {
export const hr = {
borderColor: "#272A2E",
- margin: "20px 0",
};
export const sans = {
diff --git a/internal-packages/emails/emails/invite.tsx b/internal-packages/emails/emails/invite.tsx
index 56ff815bff..e67ae0dddc 100644
--- a/internal-packages/emails/emails/invite.tsx
+++ b/internal-packages/emails/emails/invite.tsx
@@ -1,8 +1,18 @@
-import { Body, Container, Head, Html, Link, Preview, Text } from "@react-email/components";
+import {
+ Body,
+ Button,
+ Container,
+ Html,
+ Link,
+ Preview,
+ Section,
+ Text,
+} from "@react-email/components";
+import { Tailwind } from "@react-email/tailwind";
import { z } from "zod";
import { Footer } from "./components/Footer";
import { Image } from "./components/Image";
-import { anchor, container, h1, main, paragraphLight } from "./components/styles";
+import { paragraphLight } from "./components/styles";
export const InviteEmailSchema = z.object({
email: z.literal("invite"),
@@ -20,30 +30,46 @@ export default function Email({
}: z.infer) {
return (
-
{`You've been invited to ${orgName}`}
-
-
- {`You've been invited to ${orgName}`}
-
- {inviterName ?? inviterEmail} has invited you to join their organization on Trigger.dev.
-
-
- Click here to view the invitation
-
-
-
-
-
-
+
+
+
+
+
+ {`You've been invited to ${orgName}`}
+
+ {inviterName ?? inviterEmail} has invited you to join their organization on
+ Trigger.dev.
+
+
+
+
+
+ Can't see the button? Copy and paste this link into your browser:
+
+
+ {inviteLink}
+
+
+
+
+
+
);
}
diff --git a/internal-packages/emails/emails/magic-link.tsx b/internal-packages/emails/emails/magic-link.tsx
index 21ec1575d0..4a552f4ba0 100644
--- a/internal-packages/emails/emails/magic-link.tsx
+++ b/internal-packages/emails/emails/magic-link.tsx
@@ -1,39 +1,67 @@
-import { Body, Container, Head, Html, Link, Preview, Text } from "@react-email/components";
+import {
+ Body,
+ Button,
+ Container,
+ Hr,
+ Html,
+ Link,
+ Preview,
+ Section,
+ Text,
+} from "@react-email/components";
+import { Tailwind } from "@react-email/tailwind";
import { Footer } from "./components/Footer";
import { Image } from "./components/Image";
-import { anchor, container, h1, main, paragraphLight } from "./components/styles";
+import { hr } from "./components/styles";
export default function Email({ magicLink }: { magicLink: string }) {
return (
-
- Log in with this magic link 🪄
-
-
- Log in to Trigger.dev
-
- Click here to log in with this magic link
-
-
- If you didn't try to log in, you can safely ignore this email.
-
-
-
-
-
+ Log in with this magic link
+
+
+
+
+
+
+ Log in to Trigger.dev
+
+
+
+
+
+ Can't see the button? Copy and paste this link into your browser:{" "}
+
+
+ {magicLink}
+
+
+
+
+
+ This link expires in 30 minutes and can only be used once. If you didn't try to
+ log in, you can safely ignore this email.
+
+
+
+
+
+
);
}
diff --git a/internal-packages/emails/emails/welcome.tsx b/internal-packages/emails/emails/welcome.tsx
index 8b5dbb63ea..cdbdb83a1b 100644
--- a/internal-packages/emails/emails/welcome.tsx
+++ b/internal-packages/emails/emails/welcome.tsx
@@ -1,51 +1,64 @@
-import { Body, Head, Html, Link, Preview, Section, Text } from "@react-email/components";
+import { Body, Container, Head, Html, Link, Preview, Text } from "@react-email/components";
+import { Tailwind } from "@react-email/tailwind";
import { Footer } from "./components/Footer";
-import { anchor, bullets, footerItalic, main, paragraphLight } from "./components/styles";
export default function Email({ name }: { name?: string }) {
return (
- Hey {name ?? "there"},
- I’m Matt, CEO of Trigger.dev.
-
- Our goal is to give developers like you the ability to effortlessly create powerful
- workflows in code.
-
-
- We recommend{" "}
-
- getting started with one of our templates
- {" "}
- to get familiar with how Trigger.dev works, and then moving on to create your own
- workflows.
-
+ Welcome to Trigger.dev
+
+
+
+ Hey {name ?? "there"},
+ I’m Matt, CEO of Trigger.dev.
+
+ Our goal is to give developers like you the ability to effortlessly create powerful AI
+ agents and workflows in code.
+
+
+ I recommend our{" "}
+
+ quick start guide
+ {" "}
+ to get started, or{" "}
+
+ one of our examples
+ {" "}
+ to get familiar with how Trigger.dev works, and then move on to create your own
+ workflow.
+
-
- Feel free to reply to me if you have any questions. You can also{" "}
-
- schedule a call
- {" "}
- , or join our{" "}
-
- Discord server
- {" "}
- to connect with the community and our team.
-
+
+ Feel free to reply to this email if you have any questions or join our{" "}
+
+ Discord
+ {" "}
+ to connect with the community and our team.
+
- We hope you enjoy using Trigger.dev!
+ We hope you enjoy using Trigger.dev!
- Best,
- Matt
- CEO, Trigger.dev
-
- If you don’t want me to contact you again, please just let me know and I’ll update your
- preferences.
-
-
-
+ Best,
+ Matt
+ CEO, Trigger.dev
+
+ If you don’t want me to contact you again, please just let me know and I’ll update
+ your preferences.
+
+
+
+
+
);
}
diff --git a/internal-packages/emails/package.json b/internal-packages/emails/package.json
index e5d35cb2ee..df40c9a65e 100644
--- a/internal-packages/emails/package.json
+++ b/internal-packages/emails/package.json
@@ -10,16 +10,18 @@
},
"dependencies": {
"@aws-sdk/client-ses": "^3.716.0",
- "@react-email/components": "0.0.16",
- "@react-email/render": "^0.0.12",
+ "@react-email/components": "0.4.0",
+ "@react-email/render": "^1.1.4",
+ "@react-email/tailwind": "1.2.0",
"nodemailer": "^6.9.16",
"react": "^18.2.0",
- "react-email": "^2.1.1",
+ "react-email": "^4.2.7",
"resend": "^3.2.0",
"tiny-invariant": "^1.2.0",
"zod": "3.25.76"
},
"devDependencies": {
+ "@react-email/preview-server": "4.2.8",
"@types/nodemailer": "^6.4.17",
"@types/react": "18.2.69"
},
diff --git a/internal-packages/emails/src/transports/aws-ses.ts b/internal-packages/emails/src/transports/aws-ses.ts
index 58a136e1d6..0ae3e04def 100644
--- a/internal-packages/emails/src/transports/aws-ses.ts
+++ b/internal-packages/emails/src/transports/aws-ses.ts
@@ -1,37 +1,36 @@
import { render } from "@react-email/render";
import { EmailError, MailMessage, MailTransport, PlainTextMailMessage } from "./index";
-import nodemailer from "nodemailer"
-import * as awsSes from "@aws-sdk/client-ses"
+import nodemailer from "nodemailer";
+import * as awsSes from "@aws-sdk/client-ses";
export type AwsSesMailTransportOptions = {
- type: 'aws-ses',
-}
+ type: "aws-ses";
+};
export class AwsSesMailTransport implements MailTransport {
#client: nodemailer.Transporter;
constructor(options: AwsSesMailTransportOptions) {
- const ses = new awsSes.SESClient()
+ const ses = new awsSes.SESClient();
this.#client = nodemailer.createTransport({
SES: {
aws: awsSes,
- ses
- }
- })
+ ses,
+ },
+ });
}
- async send({to, from, replyTo, subject, react}: MailMessage): Promise {
+ async send({ to, from, replyTo, subject, react }: MailMessage): Promise {
try {
await this.#client.sendMail({
from: from,
to,
replyTo: replyTo,
subject,
- html: render(react),
+ html: await render(react),
});
- }
- catch (error) {
+ } catch (error) {
if (error instanceof Error) {
console.error(
`Failed to send email to ${to}, ${subject}. Error ${error.name}: ${error.message}`
@@ -43,7 +42,7 @@ export class AwsSesMailTransport implements MailTransport {
}
}
- async sendPlainText({to, from, replyTo, subject, text}: PlainTextMailMessage): Promise {
+ async sendPlainText({ to, from, replyTo, subject, text }: PlainTextMailMessage): Promise {
try {
await this.#client.sendMail({
from: from,
@@ -52,8 +51,7 @@ export class AwsSesMailTransport implements MailTransport {
subject,
text: text,
});
- }
- catch (error) {
+ } catch (error) {
if (error instanceof Error) {
console.error(
`Failed to send email to ${to}, ${subject}. Error ${error.name}: ${error.message}`
diff --git a/internal-packages/emails/src/transports/smtp.ts b/internal-packages/emails/src/transports/smtp.ts
index 5dfd1dec57..d384656976 100644
--- a/internal-packages/emails/src/transports/smtp.ts
+++ b/internal-packages/emails/src/transports/smtp.ts
@@ -29,7 +29,7 @@ export class SmtpMailTransport implements MailTransport {
to,
replyTo: replyTo,
subject,
- html: render(react),
+ html: await render(react),
});
} catch (error) {
if (error instanceof Error) {