-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
task: email configuration settings #90
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this looks like just a dev box config (and not for production), ship it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be better to define a new class, say, EmailTest
, to use for testing sending email via a real SMTP server. This would isolate the configuration from the normal development workflow and prevent confusion about its use.
The current setting has the EMAIL_BACKEND set to django.core.mail.backends.console.EmailBackend
which will print out any email being sent rather than sending it to an SMTP server.
Another thing (off topic) is the TIME_ZONE setting. We should set it in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the email configuration from Tyler, I was able to send a FOI request from my dev server instance to a test public body using my personal email address for the test public body. The email was sent via postmarkapp.com to my personal email address.
While I don't agree that the email configuration should be added to the Dev configuration, I approve this PR. I think that it is less confusing for contributors to not have to worry about sending email to an SMTP server. Any emails sent from a dev server will be printed on the console and not sent to an SMTP server. Also, we don't need to verify that emails can be sent by Django to an SMTP server.
Context
This pull requests enables the sending of FOI emails to public bodies.
Testing
When testing this, both the
ENABLE_EMAIL
and the other related email configuration environment variables need to be set (depending on what you are trying to test). You should also not send a test email to a "real" public body on the development portal, as that will actually send a real email to that entity. You should create some sort of test public body and send all emails to that test entity.Example FOI Email Received
Related Items
#89