As it is shown here What is the email subject length limit?, there is an intrinsic limitation for each subject's line, which is of 998 (the maximum allowed), with a suggestion to limit to 78 characters.
The answer I linked suggests to add a carriage return, in order to overcome the limit.
So, instead of having as header:
Subject: This is a test
You should have:
Subject: This
is a test
You can try with the urlencoded version of a carriage return, which is: %0D
It's not the best solution (since having the subject on multiple lines is not the best), but it could be a good workaround to this limitation.