my $body = $fdf->_fdf_header; foreach (sort keys %{$fdf->content}) { $body .= sprintf ($fdf->_fdf_field_formatstr, $_, $fdf->_quote($fdf->content->{$_})); } $body .=$fdf->_fdf_footer; my $msg = MIME::Lite->new( From =>$cfg->Email, To =>$cfg->To, Subject =>$cfg->Subject, Filename => 'test.fdf', Type =>'application/vnd.fdf', Encoding => 'binary', Data => $body; Disposition => 'attachment' ); #### my $msg = MIME::Lite->new( From =>$cfg->Email, To =>$cfg->To, Subject =>$cfg->Subject, Filename => 'test.pgp', Type =>'application/pgp-encrypted', Encoding => 'binary', Data => $body_encrypted, Disposition => 'attachment' );