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

E-Mails not Send #14866

Open
2 tasks done
ReadyPlayer-Kilian opened this issue Jun 13, 2024 · 3 comments
Open
2 tasks done

E-Mails not Send #14866

ReadyPlayer-Kilian opened this issue Jun 13, 2024 · 3 comments
Labels

Comments

@ReadyPlayer-Kilian
Copy link

ReadyPlayer-Kilian commented Jun 13, 2024

Debug mode

Describe the bug

The test e-mail works in the setup and is also received. After the setup, sending the mails no longer works without having changed the settings.

The exception appears:
Unauthenticated.
/var/www/html/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php#82
Illuminate\Auth\AuthenticationException
*/
protected function unauthenticated($request, array $guards)
{
throw new AuthenticationException(
'Unauthenticated.', $guards, $this->redirectTo($request)
);
}

And this message in Requests:

path_info: /api/v1/settings/mailtest
status_code: 401
status_text: Unauthorized
format: html
content_type: application/json

Translated with DeepL.com (free version)

Reproduction steps

1.Installation according to instructions for Docker with SSL and MySql Container
2.
3.
...

Expected behavior

That the e-mail also works after the setup.

Screenshots

Screenshot 2024-06-13 101455 Screenshot 2024-06-13 101737 Screenshot 2024-06-13 101837

Snipe-IT Version

6.4.2

Operating System

Docker (Ubuntu)

Web Server

Docker

PHP Version

8.1.2

Operating System

Windows

Browser

Chrome

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

Unauthenticated.
/var/www/html/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php#82
Illuminate\Auth\AuthenticationException
*/
protected function unauthenticated($request, array $guards)
{
throw new AuthenticationException(
'Unauthenticated.', $guards, $this->redirectTo($request)
);
}

Additional context

Its a fresh install with docker

Copy link

welcome bot commented Jun 13, 2024

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@snipe snipe added the docker label Jun 19, 2024
@omarsuazo
Copy link

Got the same issue on a fresh install using Ubuntu Server 24.04, no docker but is the exact problem with the green flag on the Pre-Flight screen but no email is being sent.

Using versión 7.0.2, didn't tried with the newest release

@omarsuazo
Copy link

omarsuazo commented Jun 19, 2024

After some backtrack and doing a new fresh installI got the mail notifications working again.

We use GSuite on our domain so if that's your case as well make sure the parameters on the .env file look like this:

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=example@mail.com
MAIL_PASSWORD=example
MAIL_FROM_ADDR=example@mail.com
MAIL_FROM_NAME='Snipe-IT'
MAIL_REPLYTO_ADDR=example@mail.com
MAIL_REPLAYTO_NAME='Snipe-IT'
MAIL_AUTO_EMBED_METHOD='attachment'
MAIL_TLS_VERIFY_PEER=true

In my case the Mail Host was set as smtp-relay.gmail.com which for some reason was working on my past install of Snipe but wasn't on this new version.

Hope it helps!

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

No branches or pull requests

3 participants