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

Upgrade `dj-email-url` for easy TLS email connections #1678

Merged
merged 3 commits into from Mar 28, 2018

Conversation

Projects
None yet
2 participants
@jseppi
Contributor

jseppi commented Mar 28, 2018

dj-email-url v0.1.0 (changelog) automatically sets EMAIL_USE_TLS setting when using the submission: "protocol" in the email connection string. This setting is required for STARTTLS, which is what we need for use with Amazon SES.

James Seppi

@jseppi jseppi self-assigned this Mar 28, 2018

@jseppi jseppi requested a review from toolness Mar 28, 2018

@toolness

This comment has been minimized.

Contributor

toolness commented Mar 28, 2018

wait, don’t we use https://github.com/migonzalvar/dj-email-url ? i think we can specify thst config param in the url?

@jseppi

This comment has been minimized.

Contributor

jseppi commented Mar 28, 2018

ah, good catch. Didn't think to look there. Apparently we can use submission: instead of smtp: in the config url: https://github.com/migonzalvar/dj-email-url#smtp-backend

@jseppi

This comment has been minimized.

Contributor

jseppi commented Mar 28, 2018

hrm, just tried and it didn't work without the EMAIL_USE_TLS explicitly set in settings.py...

@jseppi

This comment has been minimized.

Contributor

jseppi commented Mar 28, 2018

Oh! Looks like that feature was just added in the version of dj-email-url released 4 days ago (v0.1.0): https://github.com/migonzalvar/dj-email-url/releases

James Seppi
upgrade dj-email-url; rm EMAIL_USE_TLS setting
The latest version (0.1.0) of dj-email-url will automatically set EMAIL_USE_TLS to True when the given EMAIL_URL starts with the "submission:" protocol (instead of "smtp:")
@jseppi

This comment has been minimized.

Contributor

jseppi commented Mar 28, 2018

There you go, @toolness!

Note that the EMAIL_URL setting will need to start with submission: instead of smtp:, e.g.:

EMAIL_URL=submission://<AWS_ID_KEY>:<AWS_SECRET_KEY>@email-smtp.us-east-1.amazonaws.com

@jseppi jseppi changed the title from Add EMAIL_USE_TLS to settings to Upgrade `dj-email-url` for easy TLS email connections Mar 28, 2018

@toolness

Heh, how fortunate that the support was just added a few days ago... thanks!

@jseppi jseppi merged commit 325e1da into develop Mar 28, 2018

3 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
codeclimate All good!
Details
codeclimate/total-coverage 92% (0.0% change)
Details

@jseppi jseppi deleted the aws-ses branch Mar 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment