Hi,
so I managed to get up my little webpage working. It's made in Flask and I added little contact form. Whenever I try to send it, I get Internal Server Error
. I went through error log and this is what I get:
2015-03-18 06:14:45,280 :Exception on / [POST]
Traceback (most recent call last):
File "/home/comatory/VENV/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/comatory/VENV/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/comatory/VENV/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/comatory/VENV/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/comatory/VENV/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/comatory/app/routes.py", line 32, in home
mail.send(msg)
File "/home/comatory/VENV/local/lib/python2.7/site-packages/flask_mail.py", line 491, in send
with self.connect() as connection:
File "/home/comatory/VENV/local/lib/python2.7/site-packages/flask_mail.py", line 144, in __enter__
self.host = self.configure_host()
File "/home/comatory/VENV/local/lib/python2.7/site-packages/flask_mail.py", line 156, in configure_host
host = smtplib.SMTP_SSL(self.mail.server, self.mail.port)
File "/usr/lib/python2.7/smtplib.py", line 781, in __init__
SMTP.__init__(self, host, port, local_hostname, timeout)
File "/usr/lib/python2.7/smtplib.py", line 251, in __init__
(code, msg) = self.connect(host, port)
File "/usr/lib/python2.7/smtplib.py", line 311, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib/python2.7/smtplib.py", line 786, in _get_socket
new_socket = socket.create_connection((host, port), timeout)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
error: [Errno 111] Connection refused
The app runs in virtualenv
with newest version of Flask
, flask-wtf
and flask-mail
. It runs fine locally, sending the mail works. I'm using beginner account.