Mailstream: delete cookiejar after fetching image

This commit is contained in:
Matthew Exon 2026-04-06 18:17:27 +02:00 committed by Hypolite Petovan
commit 0820765c4e

View file

@ -289,6 +289,7 @@ function mailstream_do_images(array &$item, array &$attachments)
$cookiejar = tempnam(System::getTempPath(), 'cookiejar-mailstream-');
try {
$curlResult = DI::httpClient()->get($url, HttpClientAccept::DEFAULT, [HttpClientOptions::COOKIEJAR => $cookiejar]);
unlink($cookiejar);
if (!$curlResult->isSuccess()) {
DI::logger()->debug('mailstream: fetch image url failed', [
'url' => $url,