diff --git a/Site/src/main/java/org/clinepi/service/accessRequest/AccessRequestService.java b/Site/src/main/java/org/clinepi/service/accessRequest/AccessRequestService.java index ccb25cfe..44c00361 100644 --- a/Site/src/main/java/org/clinepi/service/accessRequest/AccessRequestService.java +++ b/Site/src/main/java/org/clinepi/service/accessRequest/AccessRequestService.java @@ -196,8 +196,8 @@ public static AccessRequestParams parseAccessRequestParams( datasetId, datasetAttributes.getDisplayName(), datasetAttributes.getStudyAccess(), - datasetAttributes.getRequestEmail(), - datasetAttributes.getRequestEmailBcc(), + datasetAttributes.getRequestEmailBcc(), //managers in dashboard -> providerEmail in AccessRequestParams + datasetAttributes.getRequestEmail(), //prop in presenter -> bccEmail in AccessRequestParams (help@, staff) datasetAttributes.getRequestEmailBody(), datasetAttributes.getRequestNeedsApproval(), datasetAttributes.getRequestEmailBodyRequester(), diff --git a/Site/src/main/java/org/clinepi/service/accessRequest/AccessRequestSubmitter.java b/Site/src/main/java/org/clinepi/service/accessRequest/AccessRequestSubmitter.java index a0fffef3..572c1cea 100644 --- a/Site/src/main/java/org/clinepi/service/accessRequest/AccessRequestSubmitter.java +++ b/Site/src/main/java/org/clinepi/service/accessRequest/AccessRequestSubmitter.java @@ -132,7 +132,7 @@ public static void emailAccessRequest(EmailSender emailSender, AccessRequestPara String datasetName = params.getDatasetName(); LOG.debug("emailAccessRequest() -- requesterEmail: " + requesterEmail); - LOG.debug("emailAccessRequest() -- providerEmail: not needed" + params.getProviderEmail()); + LOG.debug("emailAccessRequest() -- providerEmail: " + params.getProviderEmail()); String bodyTemplate = params.getBodyTemplate(); Map templateSubs = Stream.concat(params.getFormFields().entrySet().stream(), params.getDatasetProperties().entrySet().stream()) @@ -164,8 +164,9 @@ public static void emailAccessRequest(EmailSender emailSender, AccessRequestPara supportEmail, //reply (from) subject, escapeHtml(metaInfo) + "\n\n" + wrapContentWithAutoResponse(requesterBody) + "\n\n", - providerEmail,null, - null + null, // cc + null, // bcc + null // attachments ); // Send auto-reply to provider @@ -175,19 +176,20 @@ public static void emailAccessRequest(EmailSender emailSender, AccessRequestPara supportEmail, //reply (from) subject, escapeHtml(metaInfo) + "\n\n" + wrapContentWithAutoResponse(managerBody) + "\n\n", - null,null, + params.getBccEmail(), // requestEmail in presenter: help@ and staff + null, null ); // Send support email (help@) emailSender.sendEmail( smtpServer, - supportEmail, //or params.getProviderEmail(), + supportEmail, requesterEmail, subject, requesterBody, null, //not needed, already sent to support - params.getBccEmail(), + null, null );