unfortunately in 13 this code does not create a clickable link, it just prints the “AbsoluteURL” at the beginning of the mail , but not at the beginning of the file name.>
$template->addHeading($l->t('Hello %s',[$user->getDisplayName()]), $l->t('Hello %s,',[$user->getDisplayName()]));
$template->addBodyText($l->t('There was some activity at %s', [$this->urlGenerator->getAbsoluteURL('/')]));
foreach ($activityEvents as $activity) {
/** @var IEvent $event */
$event = $activity['event'];
$relativeDateTime = $activity['relativeDateTime'];
$template->addBodyListItem($event->getParsedSubject(), $relativeDateTime, $event->getIcon());