[Mimedefang] When action_add_part() isn't enough...

Philip Prindeville philipp_subx at redfish-solutions.com
Fri Sep 14 01:46:40 EDT 2012


Wanted to do something like action_add_part() but I already have an MIME::Entity that I want to attach.

Proposing the following function:

sub action_add_entity($;$)
{
    my ($entity) = shift;
    my ($offset) = shift;

    return if (!in_message_context("action_add_entity"));

    $offset = -1 unless defined($offset);

    push(@AddedParts, [$entity, $offset]);
    action_rebuild();
}


Seem reasonable?

-Philip



More information about the MIMEDefang mailing list