Skip to content

Commit

Permalink
Merge pull request #104 from VEuPathDB/first-request-emails
Browse files Browse the repository at this point in the history
first request emails fix
  • Loading branch information
aurreco-uga authored Sep 25, 2023
2 parents ad4c9d8 + eec7358 commit 5c20570
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
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

0 comments on commit 5c20570

Please sign in to comment.