snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.76k stars 3.12k forks source link

Mail could not be sent. #10039

Open IT-Roman opened 2 years ago

IT-Roman commented 2 years ago

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

Describe the bug When pressing the "Sent Test" button to test email I get a message: "Mail could not be sent. No additional error message provided. Check your mail settings and your app log."

To Reproduce Steps to reproduce the behavior:

  1. Go to General Settings
  2. Click on Send Test in Test Mail
  3. See error

Expected behavior Email to be sent to my

Mail Settings (redacted) MAIL_DRIVER=smtp MAIL_HOST=exchange.DOMAIN.com MAIL_PORT=587 MAIL_USERNAME=USER@DOMAIN.com MAIL_PASSWORD="*****" MAIL_ENCRYPTION=tls MAIL_FROM_ADDR=EMAIL@DOMAIN.com MAIL_FROM_NAME='Snipe-IT' MAIL_REPLYTO_ADDR=EMAIL@DOMAIN.com MAIL_REPLYTO_NAME='Snipe-IT' MAIL_AUTO_EMBED_METHOD='attachment'

Server:

Desktop (please complete the following information):

Error Messages

Additional context

welcome[bot] commented 2 years ago

👋 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 commented 2 years ago

storage/logs is empty

That should never be true. Is the storage directory and all subdirectories writable?

JamieMcH commented 2 years ago

If you are using Exchange Online (though likely applies to current versions of Exchange server) then it no longer supports basic SMTP authentication by default. To enable basic auth for SMTP you will need to adjust this default behaviour. There is plenty of information on the Microsoft Docs site.

I think this is an issue that still needs attention though, as Microsoft is only investing in Modern Authentication methods moving forward, and are disabling all basic auth methods by default. They do support OAuth for SMTP, but I believe this is still interactive.

I wonder if it would be possible to "fake" an interactive login by passing a TOTP key/secret through to the SnipeIT app along with the password. This would allow the SnipeIT app to generate and pass TOTP codes for authentication. The app would also benefit from having the email configuration settings available in the admin settings section to allow for updates on the fly.

jros07 commented 2 years ago

I'm in a similar situation where SMTP was disabled on the email account that I was using and I'm required to use Modern authentication methods but not sure if that is a possibility within SnipeIT.

dtosun61 commented 1 year ago

I have same problem with Exchange usage. When i use 587 port, the mail function doesn't work.

log.txt

Any idea, how can i use smtp with 587 port?

thilinadias commented 8 months ago

This might be helpful to you. Check this out.

https://github.com/thilinadias/thilinadias/discussions/1#discussion-5964598

GitHub
Snipe-IT Email configuration error - Mail could not be sent. No additional error message provided. Check your mail settings and your app log. · thilinadias/thilinadias · Discussion #1
✏️ Hi Github peeps, Welcome to my discussion regarding Snipe-IT Email configuration error - Mail could not be sent. No additional error message provided. Check your mail settings and your app log. ...