Skip to content

Commit

Permalink
commented test methods and changed <a> tags to direct to prod server
Browse files Browse the repository at this point in the history
  • Loading branch information
kiloutyg committed Jun 25, 2024
1 parent 1f670e1 commit d27d4e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/Controller/FrontController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public function closedFormList(): Response
return $this->render('/services/efnc/display/closed_efnc_list.html.twig', []);
}

#[Route('/admin/old', name: 'old')]
public function testForOld(): Response
{
$this->mailerService->sendReminderEmailToAdmin();
// #[Route('/admin/old', name: 'old')]
// public function testForOld(): Response
// {
// $this->mailerService->sendReminderEmailToAdmin();

return $this->redirectToRoute('app_base');
}
// return $this->redirectToRoute('app_base');
// }
}
4 changes: 1 addition & 3 deletions src/Service/MailerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function sendReminderEmailToAdmin()
$fileName = 'email_sent.txt';
$filePath = $this->projectDir . '/public/doc/' . $fileName;

if ($today->format('d') % 1 == 0 && (!file_exists($filePath) || strpos(file_get_contents($filePath), $today->format('Y-m-d')) === false)) {
if ($today->format('d') % 2 == 0 && (!file_exists($filePath) || strpos(file_get_contents($filePath), $today->format('Y-m-d')) === false)) {

$senderEmail = $this->senderEmail;

Expand All @@ -164,8 +164,6 @@ public function sendReminderEmailToAdmin()
$email = (new TemplatedEmail())
->from($senderEmail)
->to(...$recipientsEmail)
// ->to('[email protected]')

->subject('EFNC - Rappel des fiches à cloturer.')
->htmlTemplate('/services/email_templates/reminderEmailToAdmin.html.twig')
->context([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
style="margin: 0; padding: 0;">
<a
target="_top"
href="http://slanlp0033/efnc/form{{efnc.id}}_modification_display"
href="http://slanlp0040/efnc/form{{efnc.id}}_modification_display"
style="display: block; padding: 10px; text-decoration: none; color: inherit; background-color: lightgrey; border: 1px solid #ccc; border-radius: 5px; margin-bottom: 10px;">

<span
Expand Down

0 comments on commit d27d4e6

Please sign in to comment.