Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first request emails fix #104

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> templateSubs = Stream.concat(params.getFormFields().entrySet().stream(), params.getDatasetProperties().entrySet().stream())
Expand Down Expand Up @@ -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
Expand All @@ -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
);

Expand Down