my @parts;
...
my $message = read_it;
push @parts, Email::MIME->create (
attributes => {
content_type => 'application/debian-dt',
name => 'new.ddtp',
filename => 'new.ddtp',
},
body => $message,
);
...
my $message = Email::MIME->create (
header => [
From => $from,
To => $to,
Subject => $subject,
'Message-id' => $id,
],
parts => [ '', @parts ],
);
Email::Send->new({ mailer => 'Sendmail' })->send ( $message );