Add some basic support for Linked Data (Structured Email) #1422

This commit is contained in:
the-djmaze 2024-02-05 14:52:23 +01:00
parent ea07ea45b8
commit be633f78a7
5 changed files with 322 additions and 3 deletions

View file

@ -1066,6 +1066,12 @@ trait Messages
$oMessage->SubParts->append($oPart);
$sHtml = \MailSo\Base\HtmlUtils::BuildHtml($sHtml, $aFoundCids, $aFoundDataURL, $aFoundContentLocationUrls);
$aLinkedData = $this->GetActionParam('linkedData', []);
if ($aLinkedData) {
$sHtml = \str_replace('</head>', '<script type="application/ld+json">'.\json_encode($aLinkedData).'</script></head>', $sHtml);
}
$this->Plugins()->RunHook('filter.message-html', array($oAccount, $oMessage, &$sHtml));
// First add plain