From e8ec03e75c21f13b9fcaad6524ceba27f11ddddb Mon Sep 17 00:00:00 2001 From: Raymond Jessop Date: Wed, 23 Apr 2025 00:18:19 -0500 Subject: [PATCH] still trying to get it all to render corectly on testpypi --- CHANGELOG.md | 20 +++++++++++++++----- README.md | 27 +++++++++++++++++++++++---- setup.py | 2 +- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9704106..2b424f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,17 @@ All notable changes to `django_aws_ses` will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning. -## 0.1.3 - 2025-04-23 +## \[0.1.4\] - 2025-04-23 + +### Added + +- Note in `README.md` Usage section about sending email attachments with a 10MB size limit. + +### Notes + +- Prepared for PyPI release, building on TestPyPI validation (`https://test.pypi.org/project/django-aws-ses`). + +## \[0.1.3\] - 2025-04-23 ### Added @@ -18,9 +28,9 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve ### Notes -- Prepared for PyPI release, validated on TestPyPI (`https://test.pypi.org/project/django-aws-ses`). +- Released on TestPyPI (`https://test.pypi.org/project/django-aws-ses`). -## 0.1.2 - 2025-04-22 +## \[0.1.2\] - 2025-04-22 ### Added @@ -39,7 +49,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve - Validated on TestPyPI (`https://test.pypi.org/project/django-aws-ses`). -## 0.1.1 - 2025-04-22 +## \[0.1.1\] - 2025-04-22 ### Added @@ -50,7 +60,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve - Incremented version to `0.1.1` to reflect documentation improvements. -## 0.1.0 - 2025-04-15 +## \[0.1.0\] - 2025-04-15 ### Added diff --git a/README.md b/README.md index adeb06b..a545915 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ A Django email backend for Amazon Simple Email Service (SES), featuring bounce a - Seamless integration with Django’s email framework using a custom SES backend. - Handles AWS SES bounce and complaint notifications via SNS. -- Secure unsubscribe functionality with non-expiring links and GET/POST protection. -- Django Admin dashboard for SES statistics. +- Secure unsubscribe functionality. +- Django Admin dashboard for SES statistics (superusers only). - Optional DKIM signing support (requires `dkimpy`). ## Installation @@ -223,6 +223,25 @@ email.attach_alternative(html_content, 'text/html') email.send() ``` +### Sending Email Attachments + +Send emails with attachments using `EmailMultiAlternatives`: + +```python +from django.core.mail import EmailMultiAlternatives + +subject = 'Document from Our Platform' +from_email = 'no-reply@yourdomain.com' +to = 'recipient@example.com' +text_content = 'Please find the attached document.' + +email = EmailMultiAlternatives(subject, text_content, from_email, [to]) +email.attach('document.pdf', open('path/to/document.pdf', 'rb').read(), 'application/pdf') +email.send() +``` + +- **Note**: Amazon SES limits the total email size, including attachments, to 10MB. Ensure attachments are within this limit to avoid delivery failures. + ### Handling Bounce and Complaint Notifications - Bounce and complaint notifications are processed via the SNS endpoint (`/aws_ses/bounce/`). @@ -280,7 +299,7 @@ For a detailed list of changes, improvements, and fixes across versions, see [CH Developed by the ZeeksGeeks team. See [CONTRIBUTORS.md](https://git-vault.zeeksgeeks.com/public/django_aws_ses/src/branch/master/CONTRIBUTORS.md) for individual contributors and their roles. -# Contributing to django_aws_ses +## Contributing We welcome contributions! Please follow these steps: @@ -290,7 +309,7 @@ We welcome contributions! Please follow these steps: 4. Push: `git push origin feature/your-feature` 5. Open a Pull Request. -See [CONTRIBUTORS.md](https://git-vault.zeeksgeeks.com/public/django_aws_ses/src/branch/master/CONTRIBUTING.md) for current contributors. +See [CONTRIBUTORS.md](https://git-vault.zeeksgeeks.com/public/django_aws_ses/src/branch/master/CONTRIBUTORS.md) for current contributors. ## License diff --git a/setup.py b/setup.py index e4c34e9..4f937ff 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh: setup( name="django_aws_ses", - version="0.1.3", + version="0.1.4", author="ZeeksGeeks", author_email="contact@zeeksgeeks.com", description="A Django email backend for Amazon SES with bounce and complaint handling",