snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Unable to send inventory/expiring alerts - Windows (IIS)

Open acox216 opened this issue 7 years ago • 2 comments

Please confirm you have done the following before posting your bug report:

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:

  1. Run 'php artisian snipeit:inventory-alerts' from an Command Prompt
  2. 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!

acox216 avatar Apr 16 '19 20:04 acox216

Do you have an email address entered in the "Send alerts to" field for Admin Settings > Notifications?

snipe avatar Apr 18 '19 17:04 snipe

Yep! Here's a screenshot of my settings. 2019-04-18 14_23_33-Update Alert Settings

acox216 avatar Apr 18 '19 18:04 acox216