[Mimedefang] Ooops... action_external_filter() is broken; here's a fix

David F. Skoll dfs at roaringpenguin.com
Thu Jan 3 12:22:18 EST 2002

On Thu, 3 Jan 2002, Paul wrote:

> Ok, I did that and yoru other suggestion to put it in a shell
> script. It fixed the problem, but there is a weird thing
> happening. The HTML is now replaced by text, but the Content-Type for
> that part has not changed and is still stated as text/html. Causing
> the mailreader to think that it is HTML. How do I change the
> Content-Type? or better, have MIMEDefang do it?

You have to change it "manually".  Code snippet goes something like

   action_external_filter($entity, "html2text blah blah...");
   $entity->head->mime_attr("Content-Type" => "text/plain");

Unfortunately, you have to become fairly familiar with the MIME::Entity
and MIME::Head man pages.


More information about the MIMEDefang mailing list