-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a notify email address (#7134)
* Added a notify email address * logging from address
- Loading branch information
1 parent
c9db1c5
commit 54a1888
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
|
@@ -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) { | ||
|