From: Thierry Parmentelat Date: Fri, 3 Nov 2023 13:07:27 +0000 (+0100) Subject: use a configurable address as the From: when sending a mail X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=e68365ae0a76902ee71d13a154ed5035b10e8109 use a configurable address as the From: when sending a mail this is to cope with recent changes in the deployment of SPF, including at google --- diff --git a/PLC/sendmail.py b/PLC/sendmail.py index d4a0a2a..a215dc2 100644 --- a/PLC/sendmail.py +++ b/PLC/sendmail.py @@ -35,7 +35,7 @@ def sendmail(api, To, Subject, Body, From=None, Cc=None, Bcc=None): Bcc = [Bcc] if From is None: From = ("%s Support" % api.config.PLC_NAME, - api.config.PLC_MAIL_SUPPORT_ADDRESS) + api.config.PLC_MAIL_FROM_ADDRESS) # Create a MIME-encoded UTF-8 message msg = MIMEText(Body)