It's a script I inherited. The customer support team sends out two bulk emails each day, one for east coast customers and one for west coast customers. The mass updates call the script as their action, and the script loads each record in the results and sends the appropriate (the selection of which is hard coded) email template.