python -m smtpd -n -c DebuggingServer localhost:1025
error: uncaptured python exception, closing channel <__main__.DebuggingServer li
stening localhost:1025 at 0x1ea8850> (<class 'UnicodeEncodeError'>:'ascii' codec
can't encode characters in position 6-7: ordinal not in range(128) [C:\Python33
\lib\asyncore.py|read|83] [C:\Python33\lib\asyncore.py|handle_read_event|435] [C
:\Python33\lib\asyncore.py|handle_accept|512] [C:\Python33\lib\smtpd.py|handle_a
ccepted|600] [C:\Python33\lib\smtpd.py|__init__|148] [C:\Python33\lib\smtpd.py|p
ush|276])
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '******@gmail.com'
EMAIL_HOST_PASSWORD =*********'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
def create_user(self, email, username, password=None):
if not email:
raise ValueError('Users must have an email address')
user = self.model(
email=UserManager.normalize_email(email),
username=username)
user.set_password(password)
send_mail('Subject here', 'Here is the message.', 'first@yandex.ru', ['second@mail.ru'], fail_silently=False)
user.save(using=self._db)
return user
ConnectionRefusedError: [WinError 10061] Подключение не установлено, т.к. конечн
ый компьютер отверг запрос на подключение