snipe / snipe-it

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

Error with email configuration #13389

Open sarahYB opened 1 year ago

sarahYB commented 1 year ago

Debug mode

Describe the bug

I am working on email setup. I did edit the .env file as per the instructions provided in Snipe-IT documentation.

Reproduction steps

Here is what I did: MAIL_DRIVER=smtp MAIL_HOST=smtp.my domain MAIL_PORT=587 MAIL_USERNAME=notifsmtp@my domain MAIL_PASSWORD=my password MAIL_ENCRYPTION=tls MAIL_FROM_ADDR=notifsmtp@moj.gov.sa MAIL_FROM_NAME='Snipe-IT' MAIL_REPLYTO_ADDR=notifsmtp@moj.gov.sa MAIL_REPLYTO_NAME='Snipe-IT' MAIL_AUTO_EMBED_METHOD='attachment'

Expected behavior

Email should be sent.

Screenshots

No response

Snipe-IT Version

v6.1.2 build 10938 (g32747cafd)

Operating System

redhat 8

Web Server

Nginx

PHP Version

8.1.21

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

sarahYB commented 1 year ago

In mail host, i added my company SMTP host. Why i am getting an error related to email-smtp.us-west-2.amazonaws.com ? image

sarahYB commented 1 year ago

Hello,

Is there anything I can do to solve this issue?

Appreciate your support.

snipe commented 1 year ago

Are you running SELinux? https://snipe-it.readme.io/docs/linuxosx#notes-on-selinux

If it's not an SELinux issue, it would have to be a networking issue.

(In the future, please post the errors in text, not in a screenshot, so that they're searchable by other users.)

You can also check out some of the suggestions here:

Snipe-IT Documentation
Linux/OSX
Setting up a web server can sound daunting for folks who don't normally do that kind of thing. This guide will help you walk through the configuration for Apache or Nginx on Linux and OSX.Using ApacheThe most common setup for Snipe-IT on a linux server is to use Apache, so if you're not sure what to...
Stack Overflow
socket_connect keeps failing with permission denied
I am running into the following error message: socket_connect(): unable to connect [61]: Connection refused The code that I am using: $address = 'localhost'; $port = 5600; $socket = socket_create(
Stack Overflow
mail: failed to open stream: Permission denied?
I get this warning sending mails with php Warning: mail(1) [function.mail]: failed to open stream: Permission denied in /home/... using ssmtp and gmail as smtp PHP 5.3.1 nothing in the logs (no er...
sarahYB commented 1 year ago

No, SELinux is not running as indicated in the below:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
snipe commented 1 year ago

I don't have any idea why it would default to AWS. We don't have anything in our code that does that.

Is it possible you have two installs on the same server? Have you tried clearing your config cache? php artisan config:clear