snipe / snipe-it

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

Email not sent #14849

Open mzandi17 opened 5 months ago

mzandi17 commented 5 months ago

Debug mode

Describe the bug

i have an issue with smtp config in snipe-it i have installed snipe-it with docker. as the instruction in snipe-it website i added configuration commands in my_env_file.

Reproduction steps

Email Parameters

- the hostname/IP address of your mailserver

MAIL_PORT_587_TCP_ADDR=smtp.gmail.com

the port for the mailserver (probably 587, could be another)

MAIL_PORT_587_TCP_PORT=587

the default from address, and from name for emails

MAIL_ENV_FROM_ADDR=username@gmail.com MAIL_ENV_FROM_NAME=username

- pick 'tls' for SMTP-over-SSL, 'tcp' for unencrypted

MAIL_ENV_ENCRYPTION=tls

SMTP username and password

MAIL_ENV_USERNAME=username@gmail.com MAIL_ENV_PASSWORD=password

Expected behavior

Mail could not be sent. No additional error message provided. Check your mail settings and your app log. This will attempt to send a test mail to ${MAIL_ENV_FROM_ADDR}.

Screenshots

No response

Snipe-IT Version

6.4.2

Operating System

ubuntu

Web Server

Apache/2.4.52

PHP Version

PHP 8.1.2

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

welcome[bot] commented 5 months 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 5 months ago

Are you running this in docker, or...? Is there anything in your app logs?

addex12 commented 5 months ago

I think you need to work on your .env file. I am not sure where MAIL_ENV_FROM_ADDR cames from. It is MAIL_FROM_ADDR on mine.

marcusmoore commented 5 months ago

Have you checked the documentation for sending with Gmail? There's some additional steps to get that working.

marcusmoore commented 5 months ago

@addex12 they are using docker so they are referencing the docker .env files. Good thinking though 😄

sbeavan-ciw commented 1 week ago

I also am unable to get Snipe-IT docker to send emails.