my ($WinmailDat) = grep{ $_->{Filename} eq 'winmail.dat'; }@{ $Mail{Attachment} }; return 1 if !$WinmailDat; my @NewAttachments; # Do the converting for my $File ( @FilesInWinmailDat ) { push @NewAttachments, { Filename => $File->name, Content => $File->data, ContentType => 'application/octet-stream', }; } push @{ $Param{GetParam}->{Attachment} }, @NewAttachments;