Have you updated all your server behaviors to MySQLi? That error message would suggest there may be old MySQL code somewhere. Also check your email send settings in terms of the maximum number of emails sent per minute and wait xx seconds between emails - you might have to adjust these so that they aren't all sending at once.