Replies: 1 comment
-
The error's telling you "$message->getTextPart()" is null (there's no text part in the message). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been using the following code for reading my emails. It was working fine until I got the error below. I tried a few options to fix it but none works. Any idea how to make it work?
CODE:
if ( null === $message->getTextPart()->getHeaderParameter('content-type', 'charset'))
{
$message->getTextPart()->setCharsetOverride('utf-8');
}
ERROR:
Fatal error: Uncaught Error: Call to a member function getHeaderParameter() on null in /myscript.php:67 Stack trace: #0 {main} thrown in /myscript.php on line 67 (line 67 is the if statement)
Beta Was this translation helpful? Give feedback.
All reactions