mail
mail copied to clipboard
Backtrack limit was exhausted with base64 encoded image
Version: 3.1.5
Bug Description
Whenever there is a bigger base64 encoded image in E-mail we get this exception:

Steps To Reproduce
It's clear from bug description
Additional
I'm not sure how to even solve this, avoiding Regex if possible would maybe be best since we never know how big e-mail can be and with base64 encoded images this can become huge quickly... I know I can set bigger limit, but then again how much memory will it use and when will we hit it again... Probably only proper solution here would be to add image as attachment and not base64 encoded... I've managed to avoid issue in this particular mail since we're not using any images so I just set basePath as null so it doesn't go into this part of code, but obviously that's not a solution...
As a workaround, don't pass second argument to setHtmlBody() to avoid regexp.
Yeah I did that in this case... Last sentence