Hi,
I've come across Email::Store and I'm trying it out. It might be just the ticket for my application. I'm having a problem with Email::Store::Mail not always storing attachments though, which seems to fail on one of the two test-case emails in the t/ directory of the CPAN package.
Here's my test script (running with Email::Store and related packages downloaded from CPAN only yesterday):
#!/usr/bin/perl
$spec = 'dbi:mysql:dbname=test'; $user = 'test';
use Email::Store 'dbi:mysql:dbname=test:user=test';
# Email::Store->setup;
use File::Slurp;
foreach my $file ("/tmp/troublesome", "/tmp/attach-test") {
my $data = read_file($file);
my $mail = Email::Store::Mail->store($data);my @z = $mail->attachments;
print "Attachments: ",int(@z),"\n";
foreach (@z) {
printf "%s, %s, %d\n", $_->filename, $_->content_type, length($_->payload);
}
}
The CPAN package's t/attach-test file is recreated into two attachments. The t/troublesome file is however not (it doesn't even make the 'attachments' DB table). I can't see why would should be. Can you advise?
Best regds,
Struan Bartlett.
