Consider using
Parallel::ForkManager to fork off 10 or 20 (or more, depending on the machine and load) e-mailing processes. Check out the sample code in
this node.
Also, please use
Super Search. You'll find that
this question has already been answered. Keep searching to learn more about valuable modules like
CGI.pm (to help pull in your parameters), and
Email::Valid (so you don't send e-mails to invalid e-mail addresses).