Skip to content

Commit

Permalink
Adds email for tests.
Browse files Browse the repository at this point in the history
Issue: documentacao-e-tarefas/desenvolvimento_e_infra#904

Signed-off-by: Yves <[email protected]>
Signed-off-by: Thiago <[email protected]>
  • Loading branch information
YvesLepidus committed Nov 13, 2024
1 parent 12b3c95 commit 8a4e48c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions classes/PreservationEmailBuilder.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ public function buildPreservationEmail($journal, $baseUrl, $notesAndComments, $l
$fromEmail = $journal->getData('contactEmail');
$email->setFrom($fromEmail, $fromName);

$email->addRecipient(CARINIANA_EMAIL, CARINIANA_NAME);
$email->addCc($fromEmail, $fromName);
if (Config::getVar('carinianapreservation', 'email_for_tests')) {
$email->addRecipient(
Config::getVar('carinianapreservation', 'email_for_tests'),
$journal->getData('contactName')
);
} else {
$email->addRecipient(CARINIANA_EMAIL, CARINIANA_NAME);
$email->addCc($fromEmail, $fromName);
}

$plugin = new CarinianaPreservationPlugin();
$extraCopyEmail = $plugin->getSetting($journal->getId(), 'extraCopyEmail');
Expand Down

0 comments on commit 8a4e48c

Please sign in to comment.