{"action":"created","issue":{"url":"https://api.github.com/repos/zulip/zulip/issues/10455","repository_url":"https://api.github.com/repos/zulip/zulip","labels_url":"https://api.github.com/repos/zulip/zulip/issues/10455/labels{/name}","comments_url":"https://api.github.com/repos/zulip/zulip/issues/10455/comments","events_url":"https://api.github.com/repos/zulip/zulip/issues/10455/events","html_url":"https://github.com/zulip/zulip/issues/10455","id":356065340,"node_id":"MDU6SXNzdWUzNTYwNjUzNDA=","number":10455,"title":"Impossible to send email","user":{"login":"oniksfly","id":5785870,"node_id":"MDQ6VXNlcjU3ODU4NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/5785870?v=4","gravatar_id":"","url":"https://api.github.com/users/oniksfly","html_url":"https://github.com/oniksfly","followers_url":"https://api.github.com/users/oniksfly/followers","following_url":"https://api.github.com/users/oniksfly/following{/other_user}","gists_url":"https://api.github.com/users/oniksfly/gists{/gist_id}","starred_url":"https://api.github.com/users/oniksfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oniksfly/subscriptions","organizations_url":"https://api.github.com/users/oniksfly/orgs","repos_url":"https://api.github.com/users/oniksfly/repos","events_url":"https://api.github.com/users/oniksfly/events{/privacy}","received_events_url":"https://api.github.com/users/oniksfly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-31T17:31:52Z","updated_at":"2018-08-31T22:27:40Z","closed_at":null,"author_association":"NONE","body":"Short story: impossible to send email\r\nEnvironment: Ubuntu Server 16, [zulip 1.9.0-rc1 ](https://github.com/zulip/zulip/releases/tag/1.9.0-rc1)\r\n\r\n**What I do**\r\n1. Export slack data\r\n2.1. Trying to recover password with `./manage.py send_password_reset_email -u my-existing-email-address`\r\n2.2. Trying to recover password with web UI\r\n\r\n**What I expect**\r\nDeliver reset-password email to my-existing-email-address\r\n\r\n**What I've got**\r\nFor case 2.1 I've got the error:\r\n```\r\n2018-08-31 17:18:46.338 WARN [] Sending  email to my-existing-email-address\r\n2018-08-31 17:18:46.411 INFO [zulip.send_email] Sending password_reset email to ['']\r\n2018-08-31 17:18:46.411 ERR  [zulip.send_email] Error sending password_reset email to ['']\r\nTraceback (most recent call last):\r\n  File \"./manage.py\", line 36, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/management/__init__.py\", line 364, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/management/__init__.py\", line 356, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/management/base.py\", line 283, in run_from_argv\r\n    self.execute(*args, **cmd_options)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/management/base.py\", line 330, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zerver/management/commands/send_password_reset_email.py\", line 39, in handle\r\n    self.send(users)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zerver/management/commands/send_password_reset_email.py\", line 62, in send\r\n    context=context)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zerver/lib/send_email.py\", line 104, in send_email\r\n    raise EmailNotDeliveredException\r\nzerver.lib.send_email.EmailNotDeliveredException\r\n```\r\n\r\nFor case 2.2:\r\n```# tail /var/log/zulip/errors.log\r\n2018-08-31 17:16:52.143 ERR  [zulip.send_email] Error sending password_reset email to ['']\r\n2018-08-31 17:16:52.152 ERR  [django.request] Internal Server Error: /accounts/password/reset/\r\nTraceback (most recent call last):\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/handlers/exception.py\", line 41, in inner\r\n    response = get_response(request)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/handlers/base.py\", line 187, in _get_response\r\n    response = self.process_exception_by_middleware(e, request)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/handlers/base.py\", line 185, in _get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"./zerver/views/auth.py\", line 896, in password_reset\r\n    post_reset_redirect='/accounts/password/reset/done/')\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/contrib/auth/views.py\", line 54, in inner\r\n    return func(*args, **kwargs)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/utils/decorators.py\", line 149, in _wrapped_view\r\n    response = view_func(request, *args, **kwargs)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/contrib/auth/views.py\", line 306, in password_reset\r\n    form.save(**opts)\r\n  File \"./zerver/forms.py\", line 249, in save\r\n    context=context)\r\n  File \"./zerver/lib/send_email.py\", line 104, in send_email\r\n    raise EmailNotDeliveredException\r\nzerver.lib.send_email.EmailNotDeliveredException\r\n```\r\n\r\n**Configuration:**\r\n```# cat /etc/zulip/settings.py\r\n…\r\nEMAIL_HOST = 'smtp.mailgun.org'\r\nEMAIL_HOST_USER = 'mail@example.com'\r\nEMAIL_USE_TLS = True\r\nEMAIL_PORT = 465\r\n```\r\n\r\n```# cat /etc/zulip/zulip-secrets.conf\r\n[secrets]\r\n…\r\nemail_password = XXX\r\n```\r\n\r\nBTW I'm getting error mails from Django and I'm pretty sure that credentials are correct but I can't send test email `./manage.py send_test_email my-existing-email-address`:\r\n```Traceback (most recent call last):\r\n  File \"./manage.py\", line 36, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/management/__init__.py\", line 364, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/management/__init__.py\", line 356, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/management/base.py\", line 283, in run_from_argv\r\n    self.execute(*args, **cmd_options)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/management/base.py\", line 330, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zerver/management/commands/send_test_email.py\", line 21, in handle\r\n    send_mail(\"Zulip email test\", message, FromAddress.SUPPORT, kwargs['email'])\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/mail/__init__.py\", line 62, in send_mail\r\n    return mail.send()\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/mail/message.py\", line 348, in send\r\n    return self.get_connection(fail_silently).send_messages([self])\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/mail/backends/smtp.py\", line 104, in send_messages\r\n    new_conn_created = self.open()\r\n  File \"/home/zulip/deployments/2018-08-31-18-48-19/zulip-py3-venv/lib/python3.5/site-packages/django/core/mail/backends/smtp.py\", line 64, in open\r\n    self.connection = self.connection_class(self.host, self.port, **connection_params)\r\n  File \"/usr/lib/python3.5/smtplib.py\", line 251, in __init__\r\n    (code, msg) = self.connect(host, port)\r\n  File \"/usr/lib/python3.5/smtplib.py\", line 337, in connect\r\n    (code, msg) = self.getreply()\r\n  File \"/usr/lib/python3.5/smtplib.py\", line 393, in getreply\r\n    raise SMTPServerDisconnected(\"Connection unexpectedly closed\")\r\nsmtplib.SMTPServerDisconnected: Connection unexpectedly closed\r\n```\r\n\r\nAny advices? \r\n"},"comment":{"url":"https://api.github.com/repos/zulip/zulip/issues/comments/417804867","html_url":"https://github.com/zulip/zulip/issues/10455#issuecomment-417804867","issue_url":"https://api.github.com/repos/zulip/zulip/issues/10455","id":417804867,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzgwNDg2Nw==","user":{"login":"oniksfly","id":5785870,"node_id":"MDQ6VXNlcjU3ODU4NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/5785870?v=4","gravatar_id":"","url":"https://api.github.com/users/oniksfly","html_url":"https://github.com/oniksfly","followers_url":"https://api.github.com/users/oniksfly/followers","following_url":"https://api.github.com/users/oniksfly/following{/other_user}","gists_url":"https://api.github.com/users/oniksfly/gists{/gist_id}","starred_url":"https://api.github.com/users/oniksfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oniksfly/subscriptions","organizations_url":"https://api.github.com/users/oniksfly/orgs","repos_url":"https://api.github.com/users/oniksfly/repos","events_url":"https://api.github.com/users/oniksfly/events{/privacy}","received_events_url":"https://api.github.com/users/oniksfly/received_events","type":"User","site_admin":false},"created_at":"2018-08-31T22:27:40Z","updated_at":"2018-08-31T22:27:40Z","author_association":"NONE","body":"No, I used native installation. I’ll wait for new release to test it. "}}
{"actor":{"display_login":"oniksfly"}}