Skip to content

Commit

Permalink
Added a notify email address (#7134)
Browse files Browse the repository at this point in the history
* Added a notify email address

* logging from address
  • Loading branch information
Camelia-Orcid authored Nov 8, 2024
1 parent c9db1c5 commit 54a1888
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ public class ApiRateLimitFilter extends OncePerRequestFilter {
+ "(https://info.orcid.org/documentation/integration-guide/registering-a-public-api-client/ )";

private static final String SUBJECT = "[ORCID] You have exceeded the daily Public API Usage Limit - ";
private static final String FROM_ADDRESS = "\"Engagement Team, ORCID\" <[email protected]>";

@Value("${org.orcid.papi.rate.limit.fromEmail:[email protected]}")
private String FROM_ADDRESS;

@Override
protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain)
Expand Down Expand Up @@ -230,7 +232,7 @@ private void sendEmail(String clientId, LocalDate requestDate) {
// Generate html from template
String html = templateManager.processTemplate("papi_rate_limit_email_html.ftl", templateParams);
String email = emailManager.findPrimaryEmail(profile.getId()).getEmail();

LOG.info("from address={}", FROM_ADDRESS);
LOG.info("text email={}", body);
LOG.info("html email={}", html);
if (enablePanoplyPapiExceededRateInProduction) {
Expand Down

0 comments on commit 54a1888

Please sign in to comment.