Fetch
Fetch copied to clipboard
ErrorException: imap_savebody(): stream filter (convert.base64-decode): invalid byte sequence
I have the following code
$attachments = $message->getAttachments();
$attachmentPath = "storage path";
foreach ($attachments as $attachment) { $attachment->saveToDirectory($attachmentPath); }
Now and then when I call saveToDirectory method I get the following error ErrorException: imap_savebody(): stream filter (convert.base64-decode): invalid byte sequence
I can't solve the problem
Without seeing the actual attachment and metadata that's causing the issue there's no way I can help here.