'Sends email to recipients informing that ban has occurred.
Parameters
aInfo : dict
Dictionary which includes information in relation to
the ban.'

def ban(self, aInfo):

    if aInfo.get('restored'):
        return
    aInfo.update(self.message_values)
    message = ''.join([messages['ban']['head'], messages['ban'].get(self.matches, ''), messages['ban']['tail']])
    self._sendMessage(('[Fail2Ban]    %(jailname)s:    banned    %(ip)s    from    %(hostname)s' % aInfo), (message % aInfo))
