-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegEx in SendSmtpEmailAttachment::setContent fails #56
Comments
Same problem ... :-( |
Hello everyone, As we encountered the same bug with a 480Kb jpg attachment, it appears that the validation process in class SendSmtpEmailAttachment is the source of the error. Indeed the statement Disabling PCRE JIT wiht statement A solution would be to validate attachment content with |
Up, problem still here, I can't join a pdf |
Up, same problem for me with a 75Ko pdf attachment. When i tried to convert the base64 to pdf document with an online converter, the pdf is ok |
Is this API dead?? Nobody from Sendinblue to handle it? |
You can work around this by including the base64 content in the constructor, which doesn't run it through the regex check (which causes the PREG_JIT_STACKLIMIT_ERROR). $content = base64_encode(...);
$attachment = new SendSmtpEmailAttachment(["name" => $terms->getName(), "content" => $content]); Not sure why they would run large attachments through a regex in the first place, tbh. |
For work around see getbrevo/brevo-php#11 (comment) |
the RegEx in SendSmtpEmailAttachment::setContent does not evaluate to
true
I tried
$content = base64_encode(file_get_contents($filepath));
which evaluates to
false
and$content = chunk_split(base64_encode(file_get_contents($filepath)));
returns
0
So
InvalidArgumentException
is thrown all the time.Attachment is an PDF File ca. 50-60kb
The text was updated successfully, but these errors were encountered: