Unable to send inventory/expiring alerts - Windows (IIS)
Please confirm you have done the following before posting your bug report:
- [x] I have enabled debug mode
- [x] I have read checked the Common Issues page
Describe the bug Unable to send expiring alerts in Snipe-IT, utilizing the 'php artisan snipeit:inventory-alerts' or 'php artisan snipeit:expiring-alerts'. Same exact error message (and fix) as #6300
To Reproduce Steps to reproduce the behavior:
- Run 'php artisian snipeit:inventory-alerts' from an Command Prompt
- See Error.
Expected behavior Email sent after the alert command is ran.
Server (please complete the following information):
- Snipe-IT Version : v4.6.15 - build 4011
- OS: Windows Server 2012r2
- Web Server: IIS
- PHP: 7.2.8
Error Messages
Argument 1 passed to App\Models\Recipients\AlertRecipient::__construct() must be an instance of App\Models\Recipients\string, string given, called in C:\inetpub\wwwroot\inventory\app\Console\Commands\SendInventoryAlerts.php on line 58 and defined
Additional context
- Is this a fresh install or an upgrade? Upgrade
- What OS and web server you're running Snipe-IT on Windows (IIS)
- What method you used to install Snipe-IT: git install
I'm unsure if the fix is being added to Snipe-IT v5 but I received the exact same error in the latest build pulling from the master branch using PHP 7. Changing __construct(string $email) to __construct($email) from App\Models\Recipients\AlertRecipient.php fixed the issue. Just bringing this up to your attention. Cheers!
Do you have an email address entered in the "Send alerts to" field for Admin Settings > Notifications?
Yep! Here's a screenshot of my settings.
