serpent/serpent/errors.py

15 lines
549 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# -*- 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