head 1.3; access; symbols pkgsrc-2026Q3:1.2.0.42 pkgsrc-2026Q3-base:1.2 pkgsrc-2026Q2:1.2.0.40 pkgsrc-2026Q2-base:1.2 pkgsrc-2026Q1:1.2.0.38 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.36 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.34 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.32 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.30 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.28 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.26 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.24 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.22 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.20 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.2.0.18 pkgsrc-2023Q3-base:1.2 pkgsrc-2023Q2:1.2.0.16 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.14 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.12 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.10 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.8 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.6 pkgsrc-2022Q1-base:1.2 pkgsrc-2021Q4:1.2.0.4 pkgsrc-2021Q4-base:1.2 pkgsrc-2021Q3:1.2.0.2 pkgsrc-2021Q3-base:1.2 pkgsrc-2021Q2:1.1.0.2 pkgsrc-2021Q2-base:1.1; locks; strict; comment @# @; 1.3 date 2026.10.01.17.39.32; author adam; state dead; branches; next 1.2; commitid 9DinucOsATlECNXG; 1.2 date 2021.09.03.14.38.50; author khorben; state Exp; branches; next 1.1; commitid 3w4lJkfzWYY4dw7D; 1.1 date 2021.06.02.21.06.03; author khorben; state Exp; branches; next ; commitid B3GZOXlBoQVOkBVC; desc @@ 1.3 log @py-flask-sendmail: removed, last update 2012-04-21 @ text @$NetBSD: patch-flask__sendmail_message.py,v 1.2 2021/09/03 14:38:50 khorben Exp $ Fix for Python 3 From commit cc55636201554d1cf8516bb5bf0326bb498d03a7 in the flask-sendmail-ng fork at https://github.com/ncrocfer/flask-sendmail-ng. --- flask_sendmail/message.py.orig 2012-04-23 02:41:10.000000000 +0000 +++ flask_sendmail/message.py @@@@ -1,3 +1,4 @@@@ +import sys from email.mime.text import MIMEText try: @@@@ -99,7 +100,11 @@@@ class Message(object): if self.reply_to: msg['Reply-To'] = self.reply_to - return msg.as_string() + msg_str = msg.as_string() + if sys.version_info >= (3,0) and isinstance(msg_str, str): + return msg_str.encode(getattr(self, 'charset', 'utf-8')) + else: + return msg_str def send(self, connection): """ @ 1.2 log @py-flask-sendmail: fix sending messages Bumps PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-flask__sendmail_message.py,v 1.1 2021/06/02 21:06:03 khorben Exp $ @ 1.1 log @py-flask-sendmail: improve and import a couple fixes The updated patches: - fix the suppressing of messages when testing or disabled in configuration; - import what should be a better fix when piping messages to sendmail(1). Bumps PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ d8 1 a8 1 --- flask_sendmail/message.py.orig 2012-04-23 02:41:10.000000000 +0000 d10 6 a15 1 @@@@ -99,7 +99,11 @@@@ class Message(object): d22 1 a22 1 + return msg_str.encode(self.charset or 'utf-8') @