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

Backup Notification Failed after 7.0.5 update #14964

Open
2 tasks done
bstamand opened this issue Jun 25, 2024 · 14 comments
Open
2 tasks done

Backup Notification Failed after 7.0.5 update #14964

bstamand opened this issue Jun 25, 2024 · 14 comments

Comments

@bstamand
Copy link

Debug mode

Describe the bug

After updating to 7.0.5, backup notifications are failing. However test email notifications are working from the settings menu.

Reproduction steps

1.Run backup
2.
3.
...

Expected behavior

Backup runs and send email notifications.

Screenshots

Capture

Snipe-IT Version

7.0.5

Operating System

Rocky Linux 9

Web Server

Apache

PHP Version

8.3.8

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

@snipe
Copy link
Owner

snipe commented Jun 25, 2024

Do you have MAIL_BACKUP_NOTIFICATION_DRIVER and MAIL_BACKUP_NOTIFICATION_ADDRESS set in your env?

@bstamand
Copy link
Author

Do you have MAIL_BACKUP_NOTIFICATION_DRIVER and MAIL_BACKUP_NOTIFICATION_ADDRESS set in your env?

Hey there. Yes I do. MAIL_BACKUP_NOTIFICATION_DRIVER is set to 'mail'.

@snipe
Copy link
Owner

snipe commented Jun 25, 2024

And you set a MAIL_BACKUP_NOTIFICATION_ADDRESS?

@bstamand
Copy link
Author

And you set a MAIL_BACKUP_NOTIFICATION_ADDRESS?
Yes correct.

@snipe
Copy link
Owner

snipe commented Jun 25, 2024

Hm, I'm not able to reproduce this locally. :(

Screenshot 2024-06-25 at 14 56 43

@bstamand
Copy link
Author

Hm, I'm not able to reproduce this locally. :(
Screenshot 2024-06-25 at 14 56 43

Hmm interesting. Do I need quotes around the address?

@snipe
Copy link
Owner

snipe commented Jun 25, 2024

You shouldn’t need it, but I guess give it a try? Also run

composer install 
composer dump-autoload
php artisan config:clear

@bstamand
Copy link
Author

You shouldn’t need it, but I guess give it a try? Also run

composer install 
composer dump-autoload
php artisan config:clear

Thank you. The quotations made no difference. Also, I ran the commands you suggested with no luck either. Looking at the logs, it appears that the address '[email protected]' is failing authentication with Amazon SES however I can't seem to find this entry anywhere to change it. I looked through the env file and it looks correct.

@bstamand
Copy link
Author

You shouldn’t need it, but I guess give it a try? Also run

composer install 
composer dump-autoload
php artisan config:clear

Thank you. The quotations made no difference. Also, I ran the commands you suggested with no luck either. Looking at the logs, it appears that the address '[email protected]' is failing authentication with Amazon SES however I can't seem to find this entry anywhere to change it. I looked through the env file and it looks correct.

Just to let you know, I was able to resolve the issue by going into config/backup.php and manually editing this entry to reflect my send from address.

'from' => [
'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],

Thank you for your time and help today.

@snipe
Copy link
Owner

snipe commented Jun 26, 2024

You should definitely never have to edit config files directly, and it's generally recommended that you don't, since your next upgrade will give you git problems. Do you have a MAIL_FROM_ADDRESS set in your env?

@bstamand
Copy link
Author

You should definitely never have to edit config files directly, and it's generally recommended that you don't, since your next upgrade will give you git problems. Do you have a MAIL_FROM_ADDRESS set in your env?

Hi there. Yes I do.

@snipe
Copy link
Owner

snipe commented Jun 26, 2024

It would only use [email protected] if you don't have a value for that tho. Are you sure there's no typo or anything in your env?

@triple-HA
Copy link

triple-HA commented Jul 24, 2024

I found a problem in config/backup.php
`'mail' => [
'to' => env('MAIL_BACKUP_NOTIFICATION_ADDRESS', null),

        'from' => [
            'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
            'name' => env('MAIL_FROM_NAME', 'Example'),
        ],
    ],`

There is no "MAIL_FROM_ADDRESS" variable in the .env file configuration. There is "MAIL_FROM_ADDR".
If we won't change backup.php for future upgrade reasen we must add this ("MAIL_FROM_ADDRESS") variable to .env file, run php artisan config:clear and everything works fine.
Can we expect a change in the next update? Problem still available on v7.0.9

snipe added a commit that referenced this issue Jul 24, 2024
snipe added a commit that referenced this issue Jul 24, 2024
Fixed env var for backup config - related to #14964
@snipe
Copy link
Owner

snipe commented Jul 24, 2024

@triple-HA - that fix is now on master and will be in the next release

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