Skip to content

Commit

Permalink
update replyTo
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Jan 12, 2025
1 parent 780d4af commit bd30253
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion apps/web/app/api/cron/year-in-review/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function POST() {
email: {
from: "Steven from Dub.co <steven@ship.dub.co>",
to: user.email,
reply_to: "support@dub.co",
reply_to: "steven.tey@dub.co",
subject: "Dub Year in Review 🎊",
text: "Thank you for your support and here's to another year of your activity on Dub! Here's a look back at your activity in 2024.",
react: DubWrapped({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/api/stripe/webhook/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function sendCancellationFeedback({
sendEmail({
email: owner.email,
from: "Steven Tey <steven@dub.co>",
replyToFromEmail: true,
replyTo: "steven.tey@dub.co",
subject: "Feedback for Dub.co?",
text: `Hey ${owner.name ? owner.name.split(" ")[0] : "there"}!\n\nSaw you canceled your Dub subscription${reasonText ? ` and mentioned that ${reasonText}` : ""} – do you mind sharing if there's anything we could've done better on our side?\n\nWe're always looking to improve our product offering so any feedback would be greatly appreciated!\n\nThank you so much in advance!\n\nBest,\nSteven Tey\nFounder, Dub.co`,
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/web/emails/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ export const sendEmail = async ({
subject,
from,
bcc,
replyToFromEmail,
replyTo,
text,
react,
scheduledAt,
marketing,
}: Omit<CreateEmailOptions, "to" | "from"> & {
email: string;
from?: string;
replyToFromEmail?: boolean;
replyTo?: string;
marketing?: boolean;
}) => {
if (resend) {
Expand All @@ -60,7 +60,7 @@ export const sendEmail = async ({
subject,
from,
bcc,
replyToFromEmail,
replyTo,
text,
react,
scheduledAt,
Expand Down
14 changes: 6 additions & 8 deletions apps/web/emails/send-via-resend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export const sendEmailViaResend = async ({
subject,
from,
bcc,
replyToFromEmail,
replyTo = "support@dub.co",
text,
react,
scheduledAt,
marketing,
}: Omit<CreateEmailOptions, "to" | "from"> & {
email: string;
from?: string;
replyToFromEmail?: boolean;
replyTo?: string;
marketing?: boolean;
}) => {
if (!resend) {
Expand All @@ -32,12 +32,10 @@ export const sendEmailViaResend = async ({
? "Steven from Dub.co <steven@ship.dub.co>"
: "Dub.co <system@dub.co>"),
bcc: bcc,
...(!replyToFromEmail && {
replyTo: "support@dub.co",
}),
subject: subject,
text: text,
react: react,
replyTo,
subject,
text,
react,
scheduledAt,
...(marketing && {
headers: {
Expand Down

0 comments on commit bd30253

Please sign in to comment.