On 8/4/11 5:23 PM, David F. Skoll wrote:
On Thu, 04 Aug 2011 16:20:48 +0200
"Rolf E. Sonneveld"<[email protected]> wrote:
$newmsg->attach(Data => $bodypart,
Encoding => "base64");
Don't use attach. Use add_part instead (see the MIME::Entity man page)
You'll need to ensure that $newmsg is a multipart entity which you can
force with the make_multipart method.
When I use add_part I end up with the base64 encoded bodyhandle, see below.
During 'filter':
$bodypart = $entity->bodyhandle;
During 'filter_end':
(first bodypart is some html stuff)
$newmsg = MIME::Entity->build(
Data => $htmlpart,
Type => "text/html",
Encoding => "-SUGGEST",
Disposition => "inline");
$newmsg->make_multipart;
action_add_part($newmsg,$bpType,$bpEncoding,$bodypart,$bpFilename,"attachment");
The contents of the resulting added bodypart looks like:
TUlNRTo6Qm9keTo6RmlsZT1IQVNIKDB4Nzk5ZDAwKQ==
which decodes to:
MIME::Body::File=HASH(0x799d00)
Any hints?
/rolf
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang