Skip to content

InboundEmail->forward not working Laravel 10 #122

@mathewparet

Description

@mathewparet

I get the below error when trying to forward email.

Error:

Symfony\Component\Mime\Message::setBody(): Argument #1 ($body) must be of type ?Symfony\Component\Mime\Part\AbstractPart, string given, called in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php on line 23 {"exception":"[object] (TypeError(code: 0): Symfony\\Component\\Mime\\Message::setBody(): Argument #1 ($body) must be of type ?Symfony\\Component\\Mime\\Part\\AbstractPart, string given, called in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php on line 23 at /var/www/html/vendor/symfony/mime/Message.php:45)

Code:

 Mailbox::catchall(InboundEmail $inboundEmail)
{
$inboundEmail->forward('[email protected]');
}

Looks like there was a similar issue with replies to Laravel 9 - https://github.com/beyondcode/laravel-mailbox/pull/103

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions