Я добавил кортеж при попытке отправить электронное письмо, и это вызвало другую ошибку.
from django.core.mail import send_mail
send_mail('Asuntillo', 'Mensajillo', 'myemail@gmail.com', ('testemail@outlook.com', ), fail_silently=False, )
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Users\...\Python\Python38-32\lib\site-packages\django\core\mail\__init__.py", line 60, in send_mail
return mail.send()
File "C:\Users\...\Python\Python38-32\lib\site-packages\django\core\mail\message.py", line 276, in send
return self.get_connection(fail_silently).send_messages([self])
File "C:\Users\...\Programs\Python\Python38-32\lib\site-packages\django\core\mail\backends\smtp.py", line 102, in send_messages
new_conn_created = self.open()
File "C:\Users\...\Programs\Python\Python38-32\lib\site-packages\django\core\mail\backends\smtp.py", line 62, in open
self.connection = self.connection_class(self.host, self.port, **connection_params)
File "C:\Users\...\Programs\Python\Python38-32\lib\smtplib.py", line 253, in __init__
(code, msg) = self.connect(host, port)
File "C:\Users\…\Programs\Python\Python38-32\lib\smtplib.py", line 339, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "C:\Users\...\Programs\Python\Python38-32\lib\smtplib.py", line 308, in _get_socket
return socket.create_connection((host, port), timeout,
File "C:\Users\...\Programs\Python\Python38-32\lib\socket.py", line 808, in create_connection
raise err
File "C:\Users\...\Programs\Python\Python38-32\lib\socket.py", line 796, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
Я все еще учусь и не могу понять, что делаю неправильно.
Еще раз большое спасибо всем!