Skip to content

Scheduling infrastructure for absolutely everyone.

fix: custom replyTo is not set (#25867)

Anik Dhabal Babu4e3ce77de499
diff --git a/packages/features/ee/workflows/lib/service/EmailWorkflowService.ts b/packages/features/ee/workflows/lib/service/EmailWorkflowService.ts
index 4b55b4dd679..73cc6e22309 100644
--- a/packages/features/ee/workflows/lib/service/EmailWorkflowService.ts
+++ b/packages/features/ee/workflows/lib/service/EmailWorkflowService.ts
@@ -9,6 +9,7 @@ import { preprocessNameFieldDataWithVariant } from "@calcom/features/form-builde
import { getHideBranding } from "@calcom/features/profile/lib/hideBranding";
import { getSubmitterEmail } from "@calcom/features/tasker/tasks/triggerFormSubmittedNoEvent/formSubmissionValidation";
import { UserRepository } from "@calcom/features/users/repositories/UserRepository";
+import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
import { SENDER_NAME, WEBSITE_URL } from "@calcom/lib/constants";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
@@ -35,7 +36,6 @@ import type {
ScheduleEmailReminderAction,
} from "../types";
import { WorkflowService } from "./WorkflowService";
-import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
export class EmailWorkflowService {
constructor(
@@ -445,11 +445,14 @@ export class EmailWorkflowService {
]
: undefined;
+ const customReplyToEmail =
+ evt?.eventType?.customReplyToEmail || (evt as CalendarEvent).customReplyToEmail;
+
return {
subject: emailContent.emailSubject,
html: emailContent.emailBody,
...(!evt.hideOrganizerEmail && {
- replyTo: evt?.eventType?.customReplyToEmail || evt.organizer.email,
+ replyTo: customReplyToEmail || evt.organizer.email,
}),
attachments,
sender,