Skip to content

Commit

Permalink
[BUGFIX] send settle account as html with correct link
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Tepper committed Aug 19, 2021
1 parent 9c12486 commit 5fcd830
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Mealz/AccountingBundle/Controller/CostSheetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ private function sendSettlementRequestMail(Profile $profile, $urlEncodedHash)
$body = $translator->trans('payment.costsheet.mail.body', array(
'%admin%' => $this->getProfile()->getFullName(),
'%fullname%' => $profile->getFullName(),
'%link%' => $this->getParameter('env_url') . $this->generateUrl('mealz_accounting_cost_sheet_redirect_to_confirm', array(
'%link%' => rtrim($this->getParameter('env_url'), '/') . $this->generateUrl('mealz_accounting_cost_sheet_redirect_to_confirm', array(
'hash' => $urlEncodedHash))
), 'messages');
$headers = array();
$headers[] = $translator->trans('mail.sender', array(), 'messages');
$headers[] = "Content-type: text/plain; charset=utf-8";
$headers[] = "Content-type: text/html; charset=utf-8";

mail($receiver, $subject, $body, implode("\r\n", $headers));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ payment:
failure: Die Anfrage ist ungültig oder wurde bereits bestätigt.
mail:
subject: Anfrage auf Kontoausgleich
body: "Hallo HR,\n\n%admin% hat einen Kontoausgleich für %fullname% beantragt.\nKlicke auf den folgenden Link, um die Anfrage zu bestätigen:\n\n%link%"
body: '<html><head></head><body>Hallo HR,<br><br>%admin% hat einen Kontoausgleich für %fullname% beantragt.<br>Klicke auf den folgenden Link, um die Anfrage zu bestätigen:<br><br><a href="%link%">%link%</a></body></html>'
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ payment:
failure: The request is invalid or has already been confirmed.
mail:
subject: Request for account settlement
body: "Hi HR,\n\n%admin% requested an account settlement for %fullname%.\nClick on the following link to confirm it:\n\n%link%"
body: '<html><head></head><body>Hi HR,<br><br>%admin% requested an account settlement for %fullname%.<br>Click on the following link to confirm it:<br><br><a href="%link%">%link%</a></body></html>'

0 comments on commit 5fcd830

Please sign in to comment.