serpent/serpent/errors.py

15 lines
549 B
Python
Raw Permalink Normal View History

2016-05-15 11:17:48 +03:00
# -*- coding: utf-8 -*-
from twisted.mail import smtp
### Исключения
class SMTPAuthReqError(smtp.SMTPServerError):
'''Класс исключения. Сообщает о необходимости авторизации.'''
def __init__(self):
smtp.SMTPServerError.__init__(self, 550, 'Authentication required!')
class SMTPNotOpenRelay(smtp.SMTPServerError):
def __init__(self):
smtp.SMTPServerError.__init__(self, 550, 'Not Open Relay!')
###
SMTPBadRcpt = smtp.SMTPBadRcpt
SMTPBadSender = smtp.SMTPBadSender