I have never seen this way to run SQL from Perl (DBI it ain't) but I guess your problem is that $my_job gets overwritten in the loop, so you only get the last job mailed.
Replace $my_job = .... with $my_job .= ... (note the dot before the equal sign) to accumulate all found jobs.