Skip to content

Always base64-encode email attachments - #6476

Open
pajowu wants to merge 1 commit into
masterfrom
pajowu/mail_attachment_always_b64
Open

pajowu wants to merge 1 commit into
masterfrom
pajowu/mail_attachment_always_b64

Conversation

@pajowu

@pajowu pajowu commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

It might sound unneccesary to base64-encode plaintext attachments, but some smtp providers modify them otherwise

@cla-bot cla-bot Bot added the cla-signed label Aug 13, 2026
It might sound unneccesary to base64-encode plaintext attachments, but some smtp providers modify them otherwise
@pajowu
pajowu force-pushed the pajowu/mail_attachment_always_b64 branch from 39563af to cfeb7a6 Compare August 13, 2026 11:18
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.58824% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.81%. Comparing base (7fe3163) to head (cfeb7a6).

Files with missing lines Patch % Lines
src/pretix/base/services/mail.py 70.58% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6476      +/-   ##
==========================================
- Coverage   78.81%   78.81%   -0.01%     
==========================================
  Files         482      482              
  Lines       70520    70533      +13     
==========================================
+ Hits        55581    55589       +8     
- Misses      14939    14944       +5     
Files with missing lines Coverage Δ
src/pretix/base/services/mail.py 73.41% <70.58%> (-0.28%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

def _create_mime_attachment(self, content, mimetype):
"""
Convert the content, mimetype pair into a MIME attachment object.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a "why" to this comment for the future?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants