Skip to content

Missing email bodies (v2), with example to reproduce #111

@peanut24

Description

@peanut24

Hi @Webklex

webklex/laravel-imap version 2.4
webklex/php-imap version 2.5

I'm still trying to get this v2 to prod, was doing some final tests and then ran into a situation where the email bodies were not identified by v2.

After a bit of "what the hell is happening", I realised that it was only for emails sent from Spark (https://sparkmailapp.com), and only on v2, for v1 the body was identified and could be retrieved.

The email in question displays properly in gmail, as well as when using v1 to retrieve it, it seems to only be on v2. I was able to reproduce this with the below email (Had to change extension from .eml to .txt as GitHub doesn't allow uploading .eml)

dump3.txt

When running

  $messages = $inbox->query()
            ->whereSubject("a normal email, nothing fancy here")
            ->setFetchBody(true)
            ->since(now()->subDay())
            ->limit(1)
            ->get();

I get the following:

  • First dump is the subject line
  • Second dump is the result of $message->getHTMLBody() - which is null
  • Third dump is the actual message just getting dumped. You can see there only one key text which is just an empty string

image

In gmail, the email appears as:

image

Could you please see if you can reproduce this with the provided example?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions