Skip to content

Scheduling infrastructure for absolutely everyone.

replyTo includes the correct email (#20235)

Anik Dhabal Babu9bcea0fa011e
diff --git a/packages/emails/templates/attendee-daily-video-download-recording-email.ts b/packages/emails/templates/attendee-daily-video-download-recording-email.ts
index 76cfaff6901..f89819dde63 100644
--- a/packages/emails/templates/attendee-daily-video-download-recording-email.ts
+++ b/packages/emails/templates/attendee-daily-video-download-recording-email.ts
@@ -25,7 +25,12 @@ export default class AttendeeDailyVideoDownloadRecordingEmail extends BaseEmail
return {
to: `${this.attendee.name} <${this.attendee.email}>`,
from: `${this.calEvent.organizer.name} <${this.getMailerOptions().from}>`,
- replyTo: [...this.calEvent.attendees.map(({ email }) => email), this.calEvent.organizer.email],
+ replyTo: [
+ ...this.calEvent.attendees
+ .filter(({ email }) => email !== this.attendee.email)
+ .map(({ email }) => email),
+ this.calEvent.organizer.email,
+ ],
subject: `${this.t("download_recording_subject", {
title: this.calEvent.title,
date: this.getFormattedDate(),
diff --git a/packages/emails/templates/attendee-daily-video-download-transcript-email.ts b/packages/emails/templates/attendee-daily-video-download-transcript-email.ts
index a063e212f86..4fc24049348 100644
--- a/packages/emails/templates/attendee-daily-video-download-transcript-email.ts
+++ b/packages/emails/templates/attendee-daily-video-download-transcript-email.ts
@@ -36,7 +36,12 @@ export default class AttendeeDailyVideoDownloadTranscriptEmail extends BaseEmail
return {
to: `${this.attendee.name} <${this.attendee.email}>`,
from: `${this.calEvent.organizer.name} <${this.getMailerOptions().from}>`,
- replyTo: [...this.calEvent.attendees.map(({ email }) => email), this.calEvent.organizer.email],
+ replyTo: [
+ ...this.calEvent.attendees
+ .filter(({ email }) => email !== this.attendee.email)
+ .map(({ email }) => email),
+ this.calEvent.organizer.email,
+ ],
subject: `${this.t("download_transcript_email_subject", {
title: this.calEvent.title,
date: this.getFormattedDate(),
diff --git a/packages/emails/templates/attendee-request-email.ts b/packages/emails/templates/attendee-request-email.ts
index c58b3d14918..70df950a3e4 100644
--- a/packages/emails/templates/attendee-request-email.ts
+++ b/packages/emails/templates/attendee-request-email.ts
@@ -11,7 +11,12 @@ export default class AttendeeRequestEmail extends AttendeeScheduledEmail {
return {
from: `${EMAIL_FROM_NAME} <${this.getMailerOptions().from}>`,
to: toAddresses.join(","),
- replyTo: [...this.calEvent.attendees.map(({ email }) => email), this.calEvent.organizer.email],
+ replyTo: [
+ ...this.calEvent.attendees
+ .filter(({ email }) => email !== this.attendee.email)
+ .map(({ email }) => email),
+ this.calEvent.organizer.email,
+ ],
subject: `${this.calEvent.attendees[0].language.translate("booking_submitted_subject", {
title: this.calEvent.title,
date: this.getFormattedDate(),
diff --git a/packages/emails/templates/attendee-rescheduled-email.ts b/packages/emails/templates/attendee-rescheduled-email.ts
index 33e79c7fb06..c6c2d84a18a 100644
--- a/packages/emails/templates/attendee-rescheduled-email.ts
+++ b/packages/emails/templates/attendee-rescheduled-email.ts
@@ -14,7 +14,12 @@ export default class AttendeeRescheduledEmail extends AttendeeScheduledEmail {
}),
to: `${this.attendee.name} <${this.attendee.email}>`,
from: `${this.calEvent.organizer.name} <${this.getMailerOptions().from}>`,
- replyTo: [...this.calEvent.attendees.map(({ email }) => email), this.calEvent.organizer.email],
+ replyTo: [
+ ...this.calEvent.attendees
+ .filter(({ email }) => email !== this.attendee.email)
+ .map(({ email }) => email),
+ this.calEvent.organizer.email,
+ ],
subject: `${this.attendee.language.translate("event_type_has_been_rescheduled_on_time_date", {
title: this.calEvent.title,
date: this.getFormattedDate(),
diff --git a/packages/emails/templates/attendee-scheduled-email.ts b/packages/emails/templates/attendee-scheduled-email.ts
index 5564c315403..907cb1242c2 100644
--- a/packages/emails/templates/attendee-scheduled-email.ts
+++ b/packages/emails/templates/attendee-scheduled-email.ts
@@ -40,7 +40,12 @@ export default class AttendeeScheduledEmail extends BaseEmail {
}),
to: `${this.attendee.name} <${this.attendee.email}>`,
from: `${this.calEvent.organizer.name} <${this.getMailerOptions().from}>`,
- replyTo: [...this.calEvent.attendees.map(({ email }) => email), this.calEvent.organizer.email],
+ replyTo: [
+ ...this.calEvent.attendees
+ .filter(({ email }) => email !== this.attendee.email)
+ .map(({ email }) => email),
+ this.calEvent.organizer.email,
+ ],
subject: `${this.calEvent.title}`,
html: await this.getHtml(clonedCalEvent, this.attendee),
text: this.getTextBody(),
diff --git a/packages/emails/templates/attendee-updated-email.ts b/packages/emails/templates/attendee-updated-email.ts
index 5d4fa9c39b7..42e98121a36 100644
--- a/packages/emails/templates/attendee-updated-email.ts
+++ b/packages/emails/templates/attendee-updated-email.ts
@@ -14,7 +14,12 @@ export default class AttendeeUpdatedEmail extends AttendeeScheduledEmail {
}),
to: `${this.attendee.name} <${this.attendee.email}>`,
from: `${this.calEvent.organizer.name} <${this.getMailerOptions().from}>`,
- replyTo: [...this.calEvent.attendees.map(({ email }) => email), this.calEvent.organizer.email],
+ replyTo: [
+ ...this.calEvent.attendees
+ .filter(({ email }) => email !== this.attendee.email)
+ .map(({ email }) => email),
+ this.calEvent.organizer.email,
+ ],
subject: `${this.attendee.language.translate("event_type_has_been_updated", {
title: this.calEvent.title,
date: this.getFormattedDate(),
diff --git a/packages/emails/templates/organizer-add-guests-email.ts b/packages/emails/templates/organizer-add-guests-email.ts
index 5ea3b51c78a..d88008b49cb 100644
--- a/packages/emails/templates/organizer-add-guests-email.ts
+++ b/packages/emails/templates/organizer-add-guests-email.ts
@@ -16,7 +16,7 @@ export default class OrganizerAddGuestsEmail extends OrganizerScheduledEmail {
}),
from: `${APP_NAME} <${this.getMailerOptions().from}>`,
to: toAddresses.join(","),
- replyTo: [this.calEvent.organizer.email, ...this.calEvent.attendees.map(({ email }) => email)],
+ replyTo: [...this.calEvent.attendees.map(({ email }) => email)],
subject: `${this.t("guests_added_event_type_subject", {
eventType: this.calEvent.type,
name: this.calEvent.attendees[0].name,
diff --git a/packages/emails/templates/organizer-daily-video-download-recording-email.ts b/packages/emails/templates/organizer-daily-video-download-recording-email.ts
index 6aeba56175d..ff80acf5c16 100644
--- a/packages/emails/templates/organizer-daily-video-download-recording-email.ts
+++ b/packages/emails/templates/organizer-daily-video-download-recording-email.ts
@@ -23,7 +23,7 @@ export default class OrganizerDailyVideoDownloadRecordingEmail extends BaseEmail
return {
to: `${this.calEvent.organizer.email}>`,
from: `${EMAIL_FROM_NAME} <${this.getMailerOptions().from}>`,
- replyTo: [...this.calEvent.attendees.map(({ email }) => email), this.calEvent.organizer.email],
+ replyTo: [...this.calEvent.attendees.map(({ email }) => email)],
subject: `${this.t("download_recording_subject", {
title: this.calEvent.title,
date: this.getFormattedDate(),
diff --git a/packages/emails/templates/organizer-daily-video-download-transcript-email.ts b/packages/emails/templates/organizer-daily-video-download-transcript-email.ts
index 7a41a35c587..763387306ea 100644
--- a/packages/emails/templates/organizer-daily-video-download-transcript-email.ts
+++ b/packages/emails/templates/organizer-daily-video-download-transcript-email.ts
@@ -35,7 +35,7 @@ export default class OrganizerDailyVideoDownloadTranscriptEmail extends BaseEmai
return {
to: `${this.calEvent.organizer.email}>`,
from: `${EMAIL_FROM_NAME} <${this.getMailerOptions().from}>`,
- replyTo: [...this.calEvent.attendees.map(({ email }) => email), this.calEvent.organizer.email],
+ replyTo: [...this.calEvent.attendees.map(({ email }) => email)],
subject: `${this.t("download_transcript_email_subject", {
title: this.calEvent.title,
date: this.getFormattedDate(),
diff --git a/packages/emails/templates/organizer-location-change-email.ts b/packages/emails/templates/organizer-location-change-email.ts
index 13709a66ee6..b0c42619012 100644
--- a/packages/emails/templates/organizer-location-change-email.ts
+++ b/packages/emails/templates/organizer-location-change-email.ts
@@ -16,7 +16,7 @@ export default class OrganizerLocationChangeEmail extends OrganizerScheduledEmai
}),
from: `${EMAIL_FROM_NAME} <${this.getMailerOptions().from}>`,
to: toAddresses.join(","),
- replyTo: [this.calEvent.organizer.email, ...this.calEvent.attendees.map(({ email }) => email)],
+ replyTo: [...this.calEvent.attendees.map(({ email }) => email)],
subject: `${this.t("location_changed_event_type_subject", {
eventType: this.calEvent.type,
name: this.calEvent.attendees[0].name,
diff --git a/packages/emails/templates/organizer-request-email.ts b/packages/emails/templates/organizer-request-email.ts
index 02e1c08c359..f21de000d08 100644
--- a/packages/emails/templates/organizer-request-email.ts
+++ b/packages/emails/templates/organizer-request-email.ts
@@ -21,7 +21,7 @@ export default class OrganizerRequestEmail extends OrganizerScheduledEmail {
return {
from: `${EMAIL_FROM_NAME} <${this.getMailerOptions().from}>`,
to: toAddresses.join(","),
- replyTo: [this.calEvent.organizer.email, ...this.calEvent.attendees.map(({ email }) => email)],
+ replyTo: [...this.calEvent.attendees.map(({ email }) => email)],
subject: `${this.t("awaiting_approval")}: ${this.calEvent.title}`,
html: await this.getHtmlRequestEmail(template, this.calEvent, this.calEvent.organizer),
text: this.getTextBody("event_awaiting_approval"),
diff --git a/packages/emails/templates/organizer-request-reminder-email.ts b/packages/emails/templates/organizer-request-reminder-email.ts
index 8b28d49bbab..fd08080a3a3 100644
--- a/packages/emails/templates/organizer-request-reminder-email.ts
+++ b/packages/emails/templates/organizer-request-reminder-email.ts
@@ -10,7 +10,7 @@ export default class OrganizerRequestReminderEmail extends OrganizerRequestEmail
return {
from: `${EMAIL_FROM_NAME} <${this.getMailerOptions().from}>`,
to: toAddresses.join(","),
- replyTo: [this.calEvent.organizer.email, ...this.calEvent.attendees.map(({ email }) => email)],
+ replyTo: [...this.calEvent.attendees.map(({ email }) => email)],
subject: `${this.t("event_awaiting_approval_subject", {
title: this.calEvent.title,
date: this.getFormattedDate(),
diff --git a/packages/emails/templates/organizer-rescheduled-email.ts b/packages/emails/templates/organizer-rescheduled-email.ts
index d20e491a88b..0a7678a7ef4 100644
--- a/packages/emails/templates/organizer-rescheduled-email.ts
+++ b/packages/emails/templates/organizer-rescheduled-email.ts
@@ -17,7 +17,7 @@ export default class OrganizerRescheduledEmail extends OrganizerScheduledEmail {
}),
from: `${EMAIL_FROM_NAME} <${this.getMailerOptions().from}>`,
to: toAddresses.join(","),
- replyTo: [this.calEvent.organizer.email, ...this.calEvent.attendees.map(({ email }) => email)],
+ replyTo: [...this.calEvent.attendees.map(({ email }) => email)],
subject: `${this.calEvent.organizer.language.translate("event_type_has_been_rescheduled_on_time_date", {
title: this.calEvent.title,
date: this.getFormattedDate(),
diff --git a/packages/emails/templates/organizer-scheduled-email.ts b/packages/emails/templates/organizer-scheduled-email.ts
index a5649ae82f0..4c62a4219fa 100644
--- a/packages/emails/templates/organizer-scheduled-email.ts
+++ b/packages/emails/templates/organizer-scheduled-email.ts
@@ -50,7 +50,7 @@ export default class OrganizerScheduledEmail extends BaseEmail {
}),
from: `${EMAIL_FROM_NAME} <${this.getMailerOptions().from}>`,
to: toAddresses.join(","),
- replyTo: [this.calEvent.organizer.email, ...this.calEvent.attendees.map(({ email }) => email)],
+ replyTo: [...this.calEvent.attendees.map(({ email }) => email)],
subject: `${this.newSeat ? `${this.t("new_attendee")}: ` : ""}${this.calEvent.title}`,
html: await this.getHtml(
clonedCalEvent,