Struan Bartlett wrote:
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?

Can you send a copy of the "troublesome" file to see what within it may be causng a problem. As is, your problem could be 1001 different things. There currently are a few test problems with the current release, however they're going to be sorted in the next release when simon gets it out. Note that they're problems with the tests, not the code.


ta!


-- -Scott McWhirter-

Reply via email to