-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Can't fetch some attachments #150
Comments
Resolves Webklex#150 where there is other header params in the same line of boundary
I have made a PR changing getBoundary function regex of 2.5.1 version (Header.php) but just found out that till version 2.4.3, is was (Structure.php) Please, someone who understand RegEx better, take a look at this changes. This is my poor's man test with parts from 2 e-mails headers: <?php
#$p='/boundary\=(.*)/i'; # 2.5.1
##$p='/boundary=(.*?(?=;)|(.*))/i'; # PR #152
$p="/boundary=\"?([^\"]*)[\";\s]/"; # 2.4.3
$s1='Organization: GHSix
Content-Type: multipart/mixed;
boundary="=_34f19e771ef672441eab76cca3808103"
--=_34f19e771ef672441eab76cca3808103';
$s2='Message-ID: <OFC5EC803D.5298C025-ON0325872E.003DCA9D@br-petrobras.com.br>
Content-Type: multipart/mixed; boundary="--AaZz"; filename="untitled.txt"
Content-Disposition: nf-e_33210834274233009584550000027985561873768020.xml';
preg_match_all($p, $s1, $m1);
preg_match_all($p, $s2, $m2);
print_r([$m1, $m2]); |
There is something wrong with my PR? I's almost 2 months pending already. |
Hi @EthraZa , Best regards, |
I'm unable to fetch attachment from some senders messages.
It's maybe related to #142
An eml sample with this problem:
CantGetAttachment.eml.txt
And here is the output of
var_dump($message->getAttachments())
:CantGetAttachment.log.txt
As it can be seen on log at line 938, looks like it's getting the XML attachment and the body together:
Versions:
There's something I can do to get it working right?
Or, could you please point me to the file or method that could be tweked?
(This code is in production and will explode on me soon!)
Thank you.
The text was updated successfully, but these errors were encountered: