private function moveAttachments(Message $from, Swift_Message $to): array
    {
        foreach ($from->content()->attachments() as $path) {
            $to->attach(Swift_Attachment::fromPath($path));
        }
        $cids = [];
        foreach ($from->content()->embeddedAttachments() as $id => $path) {
            $cids[$id] = $to->embed(Swift_Attachment::fromPath($path));
        }

        return $cids;
    }
private function moveAttachments(Message $from, Swift_Message $to): array
    {
        foreach ($from->content()->attachments() as $path) {
            $to->attach(Swift_Attachment::fromPath($path));
        }
        $cids = [];
        foreach ($from->content()->embeddedAttachments() as $id => $path) {
            $cids[$id] = $to->embed(Swift_Attachment::fromPath($path));
        }

        return $cids;
    }
private function moveAttachments ( Message $ from , Swift_Message $ to ) : array { foreach ( $ from -> content ( ) -> attachments ( ) as $ path ) { $ to -> attach ( Swift_Attachment :: fromPath ( $ path ) ) ; } $ cids = [ ] ; foreach ( $ from -> content ( ) -> embeddedAttachments ( ) as $ id => $ path ) { $ cids [ $ id ] = $ to -> embed ( Swift_Attachment :: fromPath ( $ path ) ) ; } return $ cids ; }
Move attachments from the given message to the given Swift message.

@param Message $from Source message.
@param Swift_Message $to Destination message.

@return string[]
Move attachments from the given message to the given Swift message .