kartolo / direct_mail

it's an newsletter sending extension for the TYPO3 CMS
40 stars 115 forks source link

The body of "Symfony \ Component \ Mime \ Part \ TextPart" must be a string or a resource (got "bool").1. i grap my Newsletter from the internal pages #225

Open kartolo opened 3 years ago

kartolo commented 3 years ago
  1. i grap my Newsletter from the internal pages
  2. Detailed Information push the button next
  3. Categories next
  4. Test Mail ignore next
  5. Mass Send pic the Send mail - recipient list admin push the button Send to all subscribers in recipient list
  6. Mass Send Mail scheduled for distribution The mail was scheduled for distribution at 26-10-20 11:04
  7. push the buttom Mailer Engine Status
  8. push the Invoke Mailer Engine
  9. Error = Oops, an error occurred! The body of "Symfony\Component\Mime\Part\TextPart" must be a string or a resource (got "bool").

i work with TYPO 10.4.9

Core: Exception handler (WEB): Uncaught TYPO3 Exception: The body of "Symfony\Component\Mime\Part\TextPart" must be a string or a resource (got "bool"). | TypeError thrown in file /html/TYPO10/Franz/vendor/symfony/mime/Part/TextPart.php in line 44. Requested URL: http://myurl.co.at/typo3/index.php?route=%%2Fmodule%%2FDirectMailNavFrame%%2FMailerEngine&token=--AnonymizedToken--&id=41&invokeMailerEngine=1

in line 44 TextPart.php

    if (!\is_string($body) && !\is_resource($body)) {
        throw new \TypeError(sprintf('The body of "%s" must be a string or a resource (got "%s").', self::class, get_debug_type($body)));
    }

_Originally posted by @chrcan in https://github.com/kartolo/direct_mail/pull/220#issuecomment-716445503_

kartolo commented 3 years ago

@chrcan: I can't reproduce this. It's not caused by the changes in #220, because in line https://github.com/kartolo/direct_mail/blob/0c671b0206757c7f4930854ad5b86bfebf0bd04c/Classes/Dmailer.php#L688

$message is a string.

can you please provide a backtrace?

chrcan commented 3 years ago

hello Ivan, I could give you an admin account or I can send you my site package greeting

Am 27.10.2020 um 20:36 schrieb Ivan Kartolo notifications@github.com:

@chrcan https://github.com/chrcan: I can't reproduce this. It's not caused by the changes in #220 https://github.com/kartolo/direct_mail/pull/220, because in line https://github.com/kartolo/direct_mail/blob/0c671b0206757c7f4930854ad5b86bfebf0bd04c/Classes/Dmailer.php#L688 https://github.com/kartolo/direct_mail/blob/0c671b0206757c7f4930854ad5b86bfebf0bd04c/Classes/Dmailer.php#L688 $message is a string.

can you please provide a backtrace?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kartolo/direct_mail/issues/225#issuecomment-717487723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMVNME5OEXU5I264VZVREILSM4OLLANCNFSM4TA7V3QA.

stadtdetmold commented 3 years ago

I had the same issue, does mean same error. In my case the reason for this error was a wrong order of the finishers. There was a file upload in a TYPO3 form. The error appears when "Delete upload" is set BEFORE "Send form as email". So there was no file to be attached to the email.

AstCommodore commented 3 years ago

I've got the same exception as described in case of includeMedia is enabled and an image belongs to a normal CE Text/Media for internal pages. If my page doesn't have any media to include, it will be send without the error, other side it's broken.

Workarround: Disabling includeMedia will send the newsletter by hand / cron ...

typo3team commented 3 years ago

Still the same with Typo3 10.4.21 - the workaround by disabling icluceMedia works, but in our newsletter we need to include images otherwise there are display error in the GMX client and Office365 Outlook. Possibility to fix this? This failure results from an update of a symfony class, right.

kartolo commented 3 years ago

ok. thanks for the hint. I'll take a look at this

Boa2 commented 2 years ago

I get the same error when I try to sent a newsletter that contains images. I'm using TYPO3 version: 10.4.23 and PHP Version 7.2.23.

The log says: Core: Exception handler (WEB): Uncaught TYPO3 Exception: The body of "Symfony\Component\Mime\Part\TextPart" must be a string or a resource (got "bool"). | TypeError thrown in file /kunden/71826_91564/typo3_src-10.4.23/vendor/symfony/mime/Part/TextPart.php in line 47. Requested URL: ...

phtmgt commented 2 years ago

I have the same issue with attached files (PDFs) and it only happens occasionally. Not using Typo, but using the same base (symfony). Someone has any progress, we are trying to troubleshoot and it's close to impossible?

Sascha211 commented 2 years ago

Hi there, I found a workaround for this issue:

https://tinkabout.net/typo3-direct_mail-the-body-of-symfonycomponentmimeparttextpart-must-be-a-string-or-a-resource-got-bool-2/