-
Notifications
You must be signed in to change notification settings - Fork 481
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
issue #635: Add django-anymail #667
issue #635: Add django-anymail #667
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.
Thanks for the PR. Please check comments. Also, please test on production to ensure it's working properly.
Okay
…On Sat, 29 Jun 2024 at 00:51, Flávio Juvenal ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In backend/project_name/settings/base.py
<#667 (comment)>
:
> @@ -250,3 +251,16 @@ def base_dir_join(*args):
DEFENDER_COOLOFF_TIME = 300 # 5 minutes
DEFENDER_LOCKOUT_TEMPLATE = "defender/lockout.html"
DEFENDER_REDIS_URL = config("REDIS_URL")
+
+
+
+# myproject/settings.py
+
+# Email Backend Configuration
+EMAIL_BACKEND = "anymail.backends.sendgrid.EmailBackend" # or another supported backend
+ANYMAIL = {
+ "SENDGRID_API_KEY": config("SENDGRID_API_KEY"), # Replace with your actual API key
+ # can add other sendgrid fields here
+}
+
+DEFAULT_FROM_EMAIL = config("DEFAULT_FROM_EMAIL") # Replace with your default from email
Instead of changing base.py to use sendgrid, please change production.py.
—
Reply to this email directly, view it on GitHub
<#667 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIZPCI5MKESTC7C7QE4YOHLZJWZT3AVCNFSM6AAAAABKBKOYZGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCNBYHAYDAMJSGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
For that, I need ENV file
…On Sat, 29 Jun 2024 at 00:51, Flávio Juvenal ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Thanks for the PR. Please check comments. Also, please test on production
to ensure it's working properly.
—
Reply to this email directly, view it on GitHub
<#667 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIZPCIYHPSKLPVGVYTCHASTZJWZVJAVCNFSM6AAAAABKBKOYZGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCNBYHAYDCMRRGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
You'll follow the README to produce your own env to test. |
Oh, that I did already
I thought we need to test with real creds.
Will move it to production.py
…On Sat, 29 Jun 2024 at 01:02, Flávio Juvenal ***@***.***> wrote:
You'll follow the README to produce your own env to test.
—
Reply to this email directly, view it on GitHub
<#667 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIZPCI26NOZO6WDUB2Y5WL3ZJW24PAVCNFSM6AAAAABKBKOYZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGUYTANBUHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This change is probably breaking CI and render.com setup as it introduces new required env vars that aren't mentioned there. |
Yes, mentioned the same on Note under description. Should I ping env file
as well?
…On Sat, 29 Jun 2024 at 01:07, Hugo Bessa ***@***.***> wrote:
This change is probably breaking CI and render.com setup as it introduces
new required env vars that aren't mentioned there.
—
Reply to this email directly, view it on GitHub
<#667 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIZPCI4GNAWJ3CJMCHMLDFTZJW3OPAVCNFSM6AAAAABKBKOYZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGUYTONJTHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@vishu1089 you'll have to update render.yaml to not use SENDGRID_USERNAME and SENDGRID_PASSWORD and start using SENDGRID_API_KEY. CTRL+F everywhere in the project for sendgrid and update whatever is necessary too, please. |
Will do, thanks for the heads up.
…On Sat, 29 Jun 2024 at 01:12, Flávio Juvenal ***@***.***> wrote:
@vishu1089 <https://github.com/vishu1089> you'll have to update
render.yaml to not use SENDGRID_USERNAME and SENDGRID_PASSWORD and start
using SENDGRID_API_KEY.
CTRL+F everywhere in the project for sendgrid and update whatever is
necessary too, please.
—
Reply to this email directly, view it on GitHub
<#667 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIZPCI3UDQIFNSOVP4MBMATZJW4EFAVCNFSM6AAAAABKBKOYZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGUZDMMBQHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
done, please recheck |
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.
Check comments
all the comments are resolved, please re-review |
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.
Overall LGTM, but I will test manually before merging. Thanks.
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.
After a closer review, there are still errors on this PR. You didn't update proj_main.yml
removing SENDGRID_USERNAME and SENDGRID_PASSWORD and adding SENDGRID_API_KEY there. Also update .github/workflows/shared-build/action.yml
.
While we appreciate the PR, please be extra-careful on changing settings. I had requested a full search over all files for "sendgrid" to perform all the changes. Please ensure you did that.
Additionally, remove the poetry.lock file. We don't include that in the boilerplate, and it's risky to keep it anyway due to supply-chain attacks. |
Okay |
Closing due to inactivity. Please feel free to reopen with the issues addressed. |
Description
I added a depedencies and some base code to use django-anymail
Types of changes
Checklist:
#Note:
Please update the config file for