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

Added a notify email address #7134

Merged
merged 2 commits into from
Nov 8, 2024
Merged
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 @@ -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
Loading