Snipe-it: mails have wrong link to snipe-it server when sent via command line (Artisan)

Created on 18 Jul 2018  路  12Comments  路  Source: snipe/snipe-it

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

Describe the bug
Emails (expired licenses) have wrong link to snipe-it server when sent via command line (Artisan)

To Reproduce
Steps to reproduce the behavior:
Execute php C:inetpub\wwwroot\snipe-it\artisan snipeit:expiring-alerts. The email received has links to assets and main system, but the url is wrong. They all start with http://localhost
I have changed the base url in app.php from localhost to the actually installation, restarted server, but it didn't make a difference.

Expected behavior
Links in email body should go to the snipe-it server

Screenshots
If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

  • Snipe-IT Version v4.4.2 - build 3666
  • OS: [Windows Server 2016]
  • Web Server: (IIS]
  • PHP Version 7.7.2

All 12 comments

I can't reproduce this at all. Can anyone else?

I can't reproduce this at all. Can anyone else?

I was unable to reproduce. (running 4.5 on server 2012 r2, IIS, PHP 7.1.7)

in my app.php file, it points to localhost as well

in my app.php file, it points to localhost as well

Yeah, we don't use the app.php for real information, all of those values are coming from the .env file. The localhost you see there is just a default that will be used if APP_URL is blank in your .env (which it should never be.)

You need to blank some of that info out ASAP or just delete that post. That App_Key decrypts your database. You may also want to ask Snipe if there's a way to change the key or something because it's online and could have been copied already.

Thanks, noticed that too. Luckily the server is not accessible from the outside.
But, definitely a no go on my side.

(There is edit history, by the way). Delete and repost in my opinion.

Agree. Done.

ery strange. It's totally possible my setup is wrong. Here is my env app settings:


REQUIRED: BASIC APP SETTINGS

APP_ENV=production
APP_DEBUG=false
APP_KEY=
APP_URL=https://asset01.sfonline.org/
APP_TIMEZONE='America/New_York'
APP_LOCALE=en

I'm calling this to check on licenses:
php C:inetpub\wwwroot\snipe-it\artisan snipeit:expiring-alerts

The email I get looks like this:
email

Have you tried clearing your config cache? php artisan config:clear?

Ha, I thought I did, but just did it again and now the links are correct. Thanks so much!

Man, I wish all issues were so easy lol

Haha, me too!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericdude101 picture ericdude101  路  5Comments

WELLBOREIS picture WELLBOREIS  路  3Comments

tbradsha picture tbradsha  路  4Comments

laTruffe79 picture laTruffe79  路  4Comments

ArchdukeNavaron picture ArchdukeNavaron  路  4Comments