Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • Loading branch information
ecarreras and Copilot authored Jul 30, 2025
commit 5422a44a3970e3df0a25b737f44abf06f29aa4e0
2 changes: 1 addition & 1 deletion qreu/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def add_attachment(self, input_buff, attname=False):

# Read bytes from buffer
content = input_buff.getvalue() if isinstance(input_buff, (StringIO, BytesIO)) else input_buff.read()
if isinstance(content, six.text_type): # Python 2
if isinstance(content, six.text_type): # Check for text/unicode type in both Python 2 and 3
content = content.encode('utf-8')

# Base64 encode
Expand Down