Hi All,
This piece of code works:
<code>
my $email = Email::MIME.create(
header-str => [from => $from,
to => @to,
subject => $Subject ],
parts => [
Email::MIME.create(
header => [ content-transfer-encoding => "quoted-printable" ],
attributes => [ content-type => "text/plain", charset =>
"utf8" ],
body-str => $Text ),
Email::MIME.create(
header => [ "Content-Transfer-Encoding" => "base64" ],
# attributes => [ content-type => "image/x-portable-greymap",
attributes => [ content-type => "application/zip;
name=$FileName",
disposition => "attachment" ],
body => $image )
]);
</code>
Problem. If there is no attachment, I want to skip the
<code>
Email::MIME.create(
header => [ "Content-Transfer-Encoding" => "base64" ],
# attributes => [ content-type => "image/x-portable-greymap",
attributes => [ content-type => "application/zip;
name=$FileName",
disposition => "attachment" ],
body => $image )
]);
</code>
So I want to put the above into a test.
Question: How do I assign something additional to "$email"
AFTER I has called "my $email = Email::MIME.create"?
Many thanks,
-T