[Mimedefang] How do I recode a part?
admin at asarian-host.net
Sun Oct 23 12:15:54 EDT 2005
Using MIME-tools-5.418, how do I recode a part?
Imagine I did the following:
my $message_body = $entity -> bodyhandle;
my $file = $message_body -> path;
open (MIME, "$file") || return undef;
my $decoded_message = <MIME>;
This gives me a decode message part, which is good. How do I recode it,
though? (after I wrote the changed message part back to the file path). I
$entity -> head -> mime_encoding;
Which gives me the original encoding.
I always thought that writing the altered message part back to the file
path, given by $message_body -> path, would suffice for MIME::Parser to
recode the part to what it originally was encoded with. But lately someone
told me I have to recode the message part myself first.
To give you an idea of what is happening, I decode, say, an HTML part,
quoted-printable; then I reformat it a bit, and write the (now unencoded!)
text back to the file, and let MIME::Parser reassemble the whole message.
Do I really need to recode the message part myself?
More information about the MIMEDefang