Skip to content
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

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

Closed
peanut24 opened this issue Feb 24, 2021 · 3 comments
Closed

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

peanut24 opened this issue Feb 24, 2021 · 3 comments
Labels
bug Something isn't working validating

Comments

@peanut24
Copy link
Contributor

peanut24 commented Feb 24, 2021

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

@Webklex Webklex added bug Something isn't working validating labels Feb 24, 2021
@peanut24
Copy link
Contributor Author

peanut24 commented Mar 1, 2021

@Webklex were you able to reproduce this one?

@afrazahmmad
Copy link

I am also facing same (empty body) issue while using sparkmail

@Webklex
Copy link
Owner

Webklex commented Nov 4, 2021

Hi @peanut24 @afrazahmmad ,
please give v3.0.0-alpha a try. The default boundary regex used to detect the message parts in a multi-part message has been changed and can now also be modified via the config options.boundary parameter inside your configuration.

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working validating
Projects
None yet
Development

No branches or pull requests

3 participants