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

Send mail notifications to multiple addresses failed #1291

Closed
zrkb opened this issue Apr 14, 2021 · 2 comments
Closed

Send mail notifications to multiple addresses failed #1291

zrkb opened this issue Apr 14, 2021 · 2 comments

Comments

@zrkb
Copy link

zrkb commented Apr 14, 2021

According to #743, it is possible to send mail notifications to multiple addresses setting an array instead of a string, but I've tested it and it fails miserably.

Digging through the code I found the culprit was the return type declaration for routeNotificationForMail() method in the Notifiable class that only return strings.

public function routeNotificationForMail(): string

I've resolved this by making a copy of that class, removing the return type declaration, and replacing it on backup.php config but it will be cool if this works out the box.

@freekmurze
Copy link
Member

This has been fixed in the latest release.

@zrkb zrkb closed this as completed Apr 23, 2021
@vrusua
Copy link
Contributor

vrusua commented Jul 3, 2024

Still getting the same issue for multiple addresses when trying setting them as an array instead of a string.

To reproduce you can run:
php artisan vendor:publish --tag=laravel-assets --ansi --force

Spatie\Backup\Exceptions\InvalidConfig::invalidEmail(): Argument #1 ($email) must be of type string, array given, called in /app/vendor/spatie/laravel-backup/src/Config/NotificationMailConfig.php on line 23

v.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants