Missed 3 methods in previous commit. Needs heavy refactoring..
This commit is contained in:
parent
287f476bd2
commit
699b45d62f
|
@ -580,7 +580,12 @@ public class EmailUtilsImpl implements EmailUtils {
|
|||
"If you have any questions, write to 'helpdesk@openaire.eu'.";
|
||||
message = createUserMail(message, authentication);
|
||||
|
||||
this.sendMail(issuer, subject, message);
|
||||
Collection<String> emailTo = new HashSet<>();
|
||||
if (repository.getRegisteredby() != null) {
|
||||
emailTo.add(repository.getRegisteredby());
|
||||
}
|
||||
emailTo.add(User.from(((OIDCAuthenticationToken) authentication).getUserInfo()).getEmail());
|
||||
this.sendMail(emailTo, subject, message);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while sending validation submission notification email to user: " + issuer, e);
|
||||
|
@ -660,7 +665,12 @@ public class EmailUtilsImpl implements EmailUtils {
|
|||
"If you have any questions, write to 'helpdesk@openaire.eu'.";
|
||||
message = createUserMail(message, authentication);
|
||||
|
||||
this.sendMail(repository.getRegisteredby(), subject, message);
|
||||
Collection<String> emailTo = new HashSet<>();
|
||||
if (repository.getRegisteredby() != null) {
|
||||
emailTo.add(repository.getRegisteredby());
|
||||
}
|
||||
emailTo.add(User.from(((OIDCAuthenticationToken) authentication).getUserInfo()).getEmail());
|
||||
this.sendMail(emailTo, subject, message);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while sending registration notification email to user: " + repository.getRegisteredby(), e);
|
||||
|
@ -720,7 +730,12 @@ public class EmailUtilsImpl implements EmailUtils {
|
|||
"If you have any questions, write to 'helpdesk@openaire.eu'.";
|
||||
message = createUserMail(message, authentication);
|
||||
|
||||
this.sendMail(repository.getRegisteredby(), subject, message);
|
||||
Collection<String> emailTo = new HashSet<>();
|
||||
if (repository.getRegisteredby() != null) {
|
||||
emailTo.add(repository.getRegisteredby());
|
||||
}
|
||||
emailTo.add(User.from(((OIDCAuthenticationToken) authentication).getUserInfo()).getEmail());
|
||||
this.sendMail(emailTo, subject, message);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while sending registration notification email to user: " + repository.getRegisteredby(), e);
|
||||
|
|
Loading…
Reference in New Issue