You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Array
(
[content] => [redacted, here I find the plain text of the email]
[type] => text
[part_number] => 0
[content_type] => text/plain
[id] =>
[name] => undefined
[disposition] => Webklex\PHPIMAP\Attribute Object
(
[name:protected] => content_disposition
[values:protected] => Array
(
[0] => inline
)
)
[img_src] =>
[size] => 1479
)
I expected to get the email plain text. This happens every time I try to get the plain text of an email.
OS: Ubuntu 16.04
PHP: 7.1.8
Version: 4.4.0
Provider: Outlook but I also tried other provider. It happens to every certified email from the Aruba PEC provider.
I'm attaching two emails that have the same issue.
Edit:
I found out that if I change the default options in the imap.php file in the config directory, from 'dispositions' => ['attachment', 'inline'],
to 'dispositions' => ['attachment'],
it does work.
Shouldn't the configuration in the make method overwrite the standard configuration? Also, what would happen if someone would attach an inline image? Shouldn't the email text be treated as what it is, the plain text of the email and not an attachment?
Hi @nettunodev ,
many thanks for your report. Please update to v5.1 and give it another try.
If you are currently using an older version below v5.0, please read the breaking changes leading up to v5.1 before upgrading.
Hello,
calling $message->getTextBody() always outputs null. Instead I find the plain text in the attachment, treated as an inline text attachment.
My configuration
My code
Then I try to download the attachment
I get this
I expected to get the email plain text. This happens every time I try to get the plain text of an email.
I'm attaching two emails that have the same issue.
Edit:
I found out that if I change the default options in the imap.php file in the config directory, from
'dispositions' => ['attachment', 'inline'],
to
'dispositions' => ['attachment'],
it does work.
Shouldn't the configuration in the make method overwrite the standard configuration? Also, what would happen if someone would attach an inline image? Shouldn't the email text be treated as what it is, the plain text of the email and not an attachment?
Thanks!
mail1.txt
mail2.txt
The text was updated successfully, but these errors were encountered: