Send Email Error in Version 12.0.1 ( smtplip.SMTPDataError)

IM getting this error when trying to send email to bulk employees or email with attachment, i have also installed wkhtmltopdf and it is working fine but getting error while sending an email
smtplip.SMTPDataError:(501, b’Syntax error - line too long’)
can anyone help me with this? it was working fine in version 11

We have same error - seems this is related to Python3. If you migrate environment back to Python2.7 - error goes away for us. Off course you will get Python2.7 deprecated warning when you run bench update - but have to put up with it until issue is resolved.

Email without pdf attachment will go through fine on Python3 - so I think this is something to do with the attachment format (MIME, etc.). PDF format is ok as it displays fine on screen and can print / save it locally as well. This is as far as I got.

Thanks for the answer. can you tell me how can i migrate the environment back to python2.7

I have installed python 2.7 on version 12 but still gets the same error in email.

Did you run bench migrate-env python2.7 ?

Run bench update thereafter. Don’t worry when you get the Pyhton2.7 is deprecated.

After update is completed, test sending email with attachment