New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allauth sign up / sign in seems broken - Connection Refused Errors #323
Comments
Looks like you don't have an email client specified, or haven't set up Mailgun. |
If you have your email client specified and the connection continues to be refused, try setting DEFAULT_FROM_EMAIL = 'you@domain.com' in your settings file. |
Switching
|
Thanks using console was a useful quick fix to turn off smtp being required to test it was otherwise working. I couldn't understand why I was getting an error on signin (I could understand why signup might be causing an error) but then realised I was trying to login with an unverified account so it was still trying to send an email. |
Would it be useful for the email backend to default back to the console if the smtp server/ backend hasn't yet been set up? That way the initial project template would fully work after the usual, migrate, runserver without requiring the smtp server/email client to be setup first. |
This perhaps isn't applicable to the docker solution, but if you run the code with the hitch framework the email should be sent (successfully) to a mock SMTP server that logs what it receives. That email can then be parsed either as a step in a test or, if you've paused the test, by using ipython, e.g.:
|
heroku addons:create mailgun I have this setup in production (although it's not working unfortunately).Wondering if there is anything else needed to get it to work? MAILGUN_API_KEY However these don't seem to be used by django-cookiecutter default setup so I presume these are just a red herring and the first two configs are the only relevant ones? |
I vote for setting as default: console.EmailBackend. |
Mandrill is (possibly) more popular but the free tier in maligun is 5 times as much as Mandrill and Mandrill doesn't have a free heroku add on like maligun. I suppose it's up to what the repo owner's want - whether they want to cover many deployment options or have a narrower focus. |
The initial question is solved, so I'm closing this issue. For the issue regarding mailgun and heroku, let's discuss this at #355 |
this is usually happens because django-allauth tries to send a vervication email to the email address the user signed up with, if you don't want that in your app just add this line in your settings.py and it'll solve the issue. |
I'm getting Connection Refused Error when attempting to signup or sign in in the default cookie cutter-django setup (consistent across multiple machine and whether developing locally or with docker).
Which look to be due to django-allauth: (e.g. signin error looks to be caused when it can't find the email address in the query - I would have expected just a typical error in the page for this)
Signup trace:
Signin trace:
The text was updated successfully, but these errors were encountered: