in reply to passing data using MIME::Lite
Then at least you will be returning a scalar from your sql subroutine and the data just might get into the email. In fact I haven't tested this code, but it is almost identical to something I do nearly every day on one of my production machines.sub sql { my $body_text; my @output = $sqlCount->execute; while (@output=$sqlCount->fetchrow_array) { $body_text .= join ":", @output; } $sqlCount->finish(); $dbcon->disconnect(); return $body_text; }
UPDATE And deibyz picked the other problem. In the message object the data should be placed as he does, or in my example, simply:
jdtorontoData => sql()
|
|---|