Unable to send mail if line is too long
Summary
User is unable to send email if SMTP server configure a maximum line length.
What is the current bug behavior?
The mail is not sent
What is the expected correct behavior?
The mail should be sent
Relevant logs and/or screenshots
Error in the logs :
smtplib.SMTPDataError: (501, b'5.6.0 Line too long')
raise SMTPDataError(code, resp)
File "/usr/local/lib/python3.11/smtplib.py", line 908, in sendmail
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return self.sendmail(from_addr, to_addrs, flatmsg, mail_options,
File "/usr/local/lib/python3.11/smtplib.py", line 986, in send_message
connection.send_message(message, message["From"])
File "/app/ProdManager/helpers/mail.py", line 71, in send_async_email
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.11/threading.py", line 975, in run
self.run()
File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
Traceback (most recent call last):
Exception in thread Thread-1 (send_async_email):
Environment info
0.17.1