snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

fix error checkin or checkout

Open hoaimv opened this issue 5 years ago • 11 comments

Hi All Thanks for helping fix this error Failed to authenticate on SMTP server with username "YOURUSERNAME" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 334 but got code "530", with message "530 Must issue a STARTTLS command first ". Authenticator PLAIN returned Expected response code 235 but got code "530", with message "530 Must issue a STARTTLS command first ".

I do not send mail to users when I checkin and checkout

REQUIRED: OUTGOING MAIL SERVER SETTINGS

--------------------------------------------

MAIL_DRIVER=smtp MAIL_HOST=email-smtp.us-west-2.amazonaws.com MAIL_PORT=587 MAIL_USERNAME=YOURUSERNAME MAIL_PASSWORD=YOURPASSWORD MAIL_ENCRYPTION=null [email protected] MAIL_FROM_NAME='Snipe-IT' [email protected] MAIL_REPLYTO_NAME='Snipe-IT' MAIL_AUTO_EMBED_METHOD='attachment'

Thanks you so much

hoaimv avatar Dec 31 '20 09:12 hoaimv

👋 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.

welcome[bot] avatar Dec 31 '20 09:12 welcome[bot]

You need to use a real mailserver, not just the example values from the .env. You can use your company's own mailserver, if you host your own mail (far less likely in the modern era), or you can use your hosted email provider's SMTP server. Alternatively (and this is what we do for our own customers) you can use a transactional email provider such as Amazon SES, Mailchimp's Mandrill service, Mailgun, or any other one. Those usually require a little bit of DNS fiddling to get going, however.

Nowadays, the most likely MAIL_ENCRYPTION value will be tls - just fyi.

If you don't care about email at all, you can set MAIL_DRIVER=log - that will just dump the various emails into your laravel.log file.

uberbrady avatar Dec 31 '20 16:12 uberbrady

@uberbrady Currently I am using email from google mail With the code below I need to change how I can send email when I check in & checkout plesase support .Thank you very much MAIL_DRIVER=smtp MAIL_HOST=email-smtp.us-west-2.amazonaws.com MAIL_PORT=587 MAIL_USERNAME=YOURUSERNAME MAIL_PASSWORD=YOURPASSWORD MAIL_ENCRYPTION=null [email protected] MAIL_FROM_NAME='Snipe-IT' [email protected] MAIL_REPLYTO_NAME='Snipe-IT' MAIL_AUTO_EMBED_METHOD='attachment'

hoaimv avatar Jan 04 '21 07:01 hoaimv

Dear uberbrady when using snipe it when checking in and check out only send emails that have 2 layers security opened Mail with 2-layer security off does not receive mail Thanks to your support

hoaimv avatar Jan 26 '21 04:01 hoaimv

Hello, I am having a similar issue. When I try checking an item in or out I get an error. I also tried sending a test email in admin settings but the test fails.

Failed to authenticate on SMTP server with username "[email protected]" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data ". Authenticator PLAIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data ". My .env settings are:

MAIL_DRIVER=smtp MAIL_HOST=mail.server.com MAIL_PORT=587 [email protected] MAIL_PASSWORD=password MAIL_ENCRYPTION=TLS [email protected] MAIL_FROM_NAME='IT Support' [email protected] MAIL_REPLYTO_NAME='IT Support' MAIL_AUTO_EMBED_METHOD='attachment'

I have tried the commands: php artisan config:clear php artisan condif:cache

but it doesn't work. Can anyone help me?

svbla avatar Mar 24 '21 16:03 svbla

Try putting your password in quotes. (MAIL_PASSWORD =password# -> MAIL_PASSWORD ="password#"

ngvannguyen avatar Apr 21 '21 11:04 ngvannguyen

Hey @nguyennv94 I tried that. Putting my password in quotes still does not work. MAIL_PASSWORD="password"

Please let me know if there is anything else I can do.

svbla avatar Apr 21 '21 15:04 svbla

Hey @nguyennv94 I tried that. Putting my password in quotes still does not work. MAIL_PASSWORD="password"

Please let me know if there is anything else I can do.

can you check with gmail email first. see how

ngvannguyen avatar Apr 21 '21 15:04 ngvannguyen

Hey @nguyennv94 I tried that. Putting my password in quotes still does not work. MAIL_PASSWORD="password" Please let me know if there is anything else I can do.

can you check with gmail email first. see how I tried using gmail, but it still didn't work. Except this time, I didn't get any error logs, only the error message "Mail could not be sent. No additional error message provided. Check your mail settings and your app log." My settings: MAIL_DRIVER=smtp MAIL_HOST=smtp-relay.gmail.com MAIL_PORT=587 [email protected] MAIL_PASSWORD="Password" MAIL_ENCRYPTION=tls [email protected] MAIL_FROM_NAME='Snipe-IT' [email protected] MAIL_REPLYTO_NAME='Snipe-IT' MAIL_AUTO_EMBED_METHOD='attachment'

svbla avatar Apr 22 '21 17:04 svbla

Hey @nguyennv94 I tried that. Putting my password in quotes still does not work. MAIL_PASSWORD="password" Please let me know if there is anything else I can do.

can you check with gmail email first. see how I tried using gmail, but it still didn't work. Except this time, I didn't get any error logs, only the error message "Mail could not be sent. No additional error message provided. Check your mail settings and your app log." My settings: MAIL_DRIVER=smtp MAIL_HOST=smtp-relay.gmail.com MAIL_PORT=587 MAIL_USERNAME=[email protected] MAIL_PASSWORD="Password" MAIL_ENCRYPTION=tls MAIL_FROM_ADDR=[email protected] MAIL_FROM_NAME='Snipe-IT' MAIL_REPLYTO_ADDR=[email protected] MAIL_REPLYTO_NAME='Snipe-IT' MAIL_AUTO_EMBED_METHOD='attachment'

My configure, MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 [email protected] MAIL_PASSWORD="mypassword" MAIL_ENCRYPTION=tls [email protected] MAIL_FROM_NAME='Snipe-IT' MAIL_REPLYTO_ADDR=my_mail MAIL_REPLYTO_NAME='Snipe-IT' MAIL_AUTO_EMBED_METHOD='attachment'

must enable IMAP and turrn ON Less Secure App access(Gmail) image image

ngvannguyen avatar Apr 23 '21 02:04 ngvannguyen

Hello @nguyennv94 ,Yes both are already enable. This is what worked for me. I checked this page: https://snipe-it.readme.io/docs/common-issues I did the following: "First, make sure your php.ini has curl.cainfo, openssl.cafile and openssl.capath point to the right cacert.pem file."

Then It worked with Gmail. After, I just replaced all the Gmail configs with the server configs I want.

Thank you very much, I had been at this for over a month now.

Snipe-IT Documentation
These commands should be run from your Snipe-IT project root, just like every other cli command we mention. They should not need to be run as root/sudo/admin.These commands clear out cached service files that help speed up modern PHP applications but can also very occasionally be out of date, resu...

svbla avatar Apr 23 '21 14:04 svbla