-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6847 from ORCID/AddDoNotReplyToEmails
notify.orcid.org and verify.orcid.org should be not reply addresses
- Loading branch information
Showing
4 changed files
with
19 additions
and
28 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 |
---|---|---|
|
@@ -14,15 +14,7 @@ public class EmailConstants { | |
|
||
public static final String LAST_RESORT_ORCID_USER_EMAIL_NAME = "ORCID Registry User"; | ||
|
||
public static final String SUPPORT_VERIFY_ORCID_ORG = "ORCID <[email protected]>"; | ||
|
||
public static final String RESET_NOTIFY_ORCID_ORG = "ORCID <[email protected]>"; | ||
|
||
public static final String CLAIM_NOTIFY_ORCID_ORG = "ORCID <[email protected]>"; | ||
|
||
public static final String DEACTIVATE_NOTIFY_ORCID_ORG = "ORCID <[email protected]>"; | ||
|
||
public static final String LOCKED_NOTIFY_ORCID_ORG = "ORCID <[email protected]>"; | ||
|
||
public static final String EMAIL_CHANGED_NOTIFY_ORCID_ORG = "ORCID <[email protected]>"; | ||
public static final String DO_NOT_REPLY_NOTIFY_ORCID_ORG = "ORCID - Do not reply <[email protected]>"; | ||
|
||
public static final String DO_NOT_REPLY_VERIFY_ORCID_ORG = "ORCID - Do not reply <[email protected]>"; | ||
} |
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
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 |
---|---|---|
|
@@ -76,7 +76,6 @@ | |
*/ | ||
public class EmailMessageSenderImpl implements EmailMessageSender { | ||
|
||
private static final String DIGEST_FROM_ADDRESS = "[email protected]"; | ||
private static final Logger LOGGER = LoggerFactory.getLogger(EmailMessageSenderImpl.class); | ||
|
||
private final Integer MAX_RETRY_COUNT; | ||
|
@@ -299,7 +298,7 @@ public void sendEmailMessages() { | |
if(!notifications.isEmpty()) { | ||
LOGGER.info("Found {} messages to send for orcid: {}", notifications.size(), orcid); | ||
EmailMessage digestMessage = createDigest(orcid, notifications); | ||
digestMessage.setFrom(DIGEST_FROM_ADDRESS); | ||
digestMessage.setFrom(EmailConstants.DO_NOT_REPLY_NOTIFY_ORCID_ORG); | ||
digestMessage.setTo(primaryEmail.getEmail()); | ||
boolean successfullySent = mailGunManager.sendEmail(digestMessage.getFrom(), digestMessage.getTo(), digestMessage.getSubject(), | ||
digestMessage.getBodyText(), digestMessage.getBodyHtml()); | ||
|
@@ -395,7 +394,7 @@ private void processServiceAnnouncementOrTipNotification(NotificationEntity n, S | |
} | ||
try { | ||
boolean successfullySent = false; | ||
String fromAddressParam = DIGEST_FROM_ADDRESS; | ||
String fromAddressParam = EmailConstants.DO_NOT_REPLY_NOTIFY_ORCID_ORG; | ||
if(!PojoUtil.isEmpty(fromAddress)) { | ||
fromAddressParam = fromAddress; | ||
} | ||
|
@@ -624,6 +623,6 @@ private void sendVerificationReminderEmail(String userOrcid, String email) { | |
// Generate body from template | ||
String body = templateManager.processTemplate("verification_email_v2.ftl", templateParams); | ||
String htmlBody = templateManager.processTemplate("verification_email_html_v2.ftl", templateParams); | ||
mailGunManager.sendEmail(EmailConstants.SUPPORT_VERIFY_ORCID_ORG, email, subject, body, htmlBody); | ||
mailGunManager.sendEmail(EmailConstants.DO_NOT_REPLY_VERIFY_ORCID_ORG, email, subject, body, htmlBody); | ||
} | ||
} |
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