diff --git a/app/CONTRIBUTING.md b/app/CONTRIBUTING.md index c8b726e..637d2fd 100644 --- a/app/CONTRIBUTING.md +++ b/app/CONTRIBUTING.md @@ -169,6 +169,12 @@ For HTML templates, we use `djlint`. Before creating a pull request, please run poetry run djlint --check templates ``` +If some files aren't properly formatted, you can format all files with + +```bash +poetry run djlint --reformat . +``` + ## Test sending email [swaks](http://www.jetmore.org/john/code/swaks/) is used for sending test emails to the `email_handler`. diff --git a/app/app/handler/unsubscribe_encoder.py b/app/app/handler/unsubscribe_encoder.py index bc07942..1f878b4 100644 --- a/app/app/handler/unsubscribe_encoder.py +++ b/app/app/handler/unsubscribe_encoder.py @@ -74,8 +74,8 @@ class UnsubscribeEncoder: ) signed_data = cls._get_signer().sign(serialized_data).decode("utf-8") encoded_request = f"{UNSUB_PREFIX}.{signed_data}" - if len(encoded_request) > 256: - LOG.e("Encoded request is longer than 256 chars") + if len(encoded_request) > 512: + LOG.w("Encoded request is longer than 512 chars") return encoded_request @staticmethod diff --git a/app/app/mail_sender.py b/app/app/mail_sender.py index 7aba370..12b60ee 100644 --- a/app/app/mail_sender.py +++ b/app/app/mail_sender.py @@ -46,6 +46,7 @@ class SendRequest: "mail_options": self.mail_options, "rcpt_options": self.rcpt_options, "is_forward": self.is_forward, + "retries": self.retries, } return json.dumps(data).encode("utf-8") @@ -66,6 +67,7 @@ class SendRequest: mail_options=decoded_data["mail_options"], rcpt_options=decoded_data["rcpt_options"], is_forward=decoded_data["is_forward"], + retries=decoded_data.get("retries", 1), ) def save_request_to_unsent_dir(self, prefix: str = "DeliveryFail"): diff --git a/app/templates/auth/register.html b/app/templates/auth/register.html index bf2f0a7..e081c90 100644 --- a/app/templates/auth/register.html +++ b/app/templates/auth/register.html @@ -9,10 +9,13 @@