Script to batch send emails