Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23305

Sending email Django with mailtrap

$
0
0

Hi I finished making my contact form but it doesn't let me send email, I'm using mailtrap as a test server but I get an error. I'm using Django 5.0 and Python 3.10

Settings.py

# Email configEMAIL_HOST = 'sandbox.smtp.mailtrap.io'EMAIL_HOST_USER = '811387a3996524'EMAIL_HOST_PASSWORD = '********6d43'EMAIL_PORT = '2525'

Error message

SMTPServerDisconnected at /contact/

Connection unexpectedly closed

Request Method: POSTRequest URL: http://127.0.0.1:8000/contact/Django Version: 5.0.4Exception Type: SMTPServerDisconnectedException Value:

Connection unexpectedly closed

Exception Location: /usr/lib/python3.10/smtplib.py, line 405, in getreplyRaised during: contact.views.contactPython Executable: /home/andres/.local/share/virtualenvs/CursoDjango-IwbI9JP5/bin/pythonPython Version: 3.10.12Python Path:

['/home/andres/Escritorio/CursoDjango/webempresa','/usr/lib/python310.zip','/usr/lib/python3.10','/usr/lib/python3.10/lib-dynload','/home/andres/.local/share/virtualenvs/CursoDjango-IwbI9JP5/lib/python3.10/site-packages']

Server time: Fri, 17 May 2024 22:26:46 +0000


Viewing all articles
Browse latest Browse all 23305

Trending Articles