in reply to mass mailing......

Hi johnny

Probably the easiest way is to write a script using the DBI module available from CPAN to read the information from the database and then to execute the smtp-client.pl script for each entry. To execute smtp-client you can use backticks and pass the options as if you were running on the command line; so for example:
my $returncode = `/path/to/smtp-client.pl --to=$to...`;
If you have many thousands of entries then this is going to take a long time and you probably need to work on sending mails in parallel, but start with the basics first.

Maybe you should also thank Michal Ludvid for writing the original code for the Command line SMTP client above :-)

Update: ...or just leave the code above alone and use the Mail::Bulkmail module. (Thanks for spotting the typo Corion!)