I see.

Have you ever considered using a commandline mailer for that? Like blat ?
hit the search link above and enter 'blat' to get some sample codes
_________________________