more flexible sqs publishing, caught some errors, added emailing