def send_messages(self, messages):
count = <NUM_LIT:0><EOL>for message in messages:<EOL><INDENT>message_body = unicodedata.normalize('<STR_LIT>', unicode(message.body)).encode('<STR_LIT:ascii>', '<STR_LIT:ignore>')<EOL>for tel_number in message.to:<EOL><INDENT>try:<EOL><INDENT>self.client.send(tel_number, message_body, getattr(settings, '<STR_LIT>', True))<EOL><DEDENT>except Exception:<EOL><INDENT>if self.fail_silently:<EOL><INDENT>log.exception('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>else:<EOL><INDENT>count += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>return count<EOL>
Sending SMS messages via sms.sluzba.cz API.

        Note:
          This method returns number of actually sent sms messages
          not number of SmsMessage instances processed.

        :param messages: list of sms messages
        :type messages: list of sendsms.message.SmsMessage instances
        :returns: number of sent sms messages
        :rtype: int