Hi there,
I am trying to send email through Snipe-IT tool, but whenever, the application trying to send an email, it gives "Whoops container" error.
I have set driver to SMTP in "/app/config/production/mail.php" file.
And using gmail id.
Please check the logs below and assist me please,
Swift_TransportException (530)
HELP
Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required. Learn more at 530 5.5.1 https://support.google.com/mail/answer/14257 u78sm11957145qge.27 - gsmtp "
What are all the configuration change needs to be done on my Ubuntu machine to make this functional.
Can we see your mail.php, with password obscured?
Thank you so much for the prompt response. Kindly help me in fixing this as soon as possible please.
Here is my /snipe-it/app/config/production/mail.php file,
<?php
return array(
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail"
|
*/
'driver' => 'smtp',
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Postmark mail service, which will provide reliable delivery.
|
*/
'host' => 'smtp.gmail.com',
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to delivery e-mails to
| users of your application. Like the host we have set this value to
| stay compatible with the Postmark e-mail application by default.
|
*/
'port' => 587,
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => array('address' => '[email protected]', 'name' => 'System Admin'),
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => 'tls',
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => viewmithun
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'password' => **********,
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Mail "Pretend"
|--------------------------------------------------------------------------
|
| When this option is enabled, e-mail will not actually be sent over the
| web and will instead be written to your application's logs files so
| you may inspect the message. This is great for local development.
|
*/
'pretend' => false,
);
The value for username has to be enclosed in single quotes.
'username' => 'viewmithun'
(So does the password)
I did the following changes to the mail.php,
'username' => 'viewmithun',
'password' => '**',
Once done, restarted apache2 service.
By default, my debug mode is true. So when I login to the Snipe IT tool. I got this error,
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
HELP
syntax error, unexpected ''password'' (T_CONSTANT_ENCAPSED_STRING), expecting ')'
Once I set debug mode to false, I restarted apache2 service and then I was able to login and tried to create a user and tick the checkbox for "email user the credentials" but got the following error again,
Oh no!
Server Error: 500 (Internal Server Error)
What does this mean?
Something went wrong on our servers while we were processing your request. We're really sorry about this, and will work hard to get this resolved as soon as possible.
Kindly help
Turn debugging back on. You've got an unclosed apostrophe or extra apostrophes somewhere in there.
(When you change these config files, you don't need to restart apache.)
I verified, I couldn't see any extra apostrophe in here,
Kindly have a look into my saved mail.php,
return array(
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail"
|
*/
'driver' => 'smtp',
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Postmark mail service, which will provide reliable delivery.
|
*/
'host' => 'smtp.gmail.com',
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to delivery e-mails to
| users of your application. Like the host we have set this value to
| stay compatible with the Postmark e-mail application by default.
|
*/
'port' => 587,
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => array('address' => '[email protected]', 'name' => 'System Admin'),
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => 'tls',
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => 'viewmithun',
/*
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'password' => ' ******** ',
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Mail "Pretend"
|--------------------------------------------------------------------------
|
| When this option is enabled, e-mail will not actually be sent over the
| web and will instead be written to your application's logs files so
| you may inspect the message. This is great for local development.
|
*/
'pretend' => false,
);
P.S
My example email id is, [email protected]
Username: viewmithun
Password: ***
Kindly help me in this regards.
Thanks.
Hi Snipe,
I worked on the error and fixed my SMTP setup of my ubuntu box.
And then tried to send email through the Snipe IT app. But, I am getting a different error altogether now.
Error:
Expected response code 220 but got code "", with message ""
Could you please help me in fixing this error, please.
My mail.php looks good for me.
Thanks for your prompt response.
Are you still sending through gmail?
Yes, I am.
Now, I am able to send email through SMTP via TERMINAL of my Ubuntu box.
But, when it comes to Snipe IT. I am getting this error.
Expected response code 220 but got code "", with message ""
(Screenshot attached)
(This error occurs, when the app tries to send email to the new users. Eg: while creating user --> send email credentials)

Please paste in your mail config file again, obscuring the password.
Sure.
FYI, I am using 465 port.
<?php
return array(
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail"
|
*/
'driver' => 'smtp',
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Postmark mail service, which will provide reliable delivery.
|
*/
'host' => 'smtp.gmail.com',
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to delivery e-mails to
| users of your application. Like the host we have set this value to
| stay compatible with the Postmark e-mail application by default.
|
*/
'port' => 465,
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => array('address' => '[email protected]', 'name' => 'Mithun'),
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => 'tls',
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => 'mithun',
/*
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'password' => '??????????',
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Mail "Pretend"
|--------------------------------------------------------------------------
|
| When this option is enabled, e-mail will not actually be sent over the
| web and will instead be written to your application's logs files so
| you may inspect the message. This is great for local development.
|
*/
'pretend' => false,
);
You need to use port 587 for Gmail.
http://docs.snipeitapp.com/installation/configuration.html#edit-mail-settings
Ok.
I used 587 port and here is the error I got,
Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/answer/14257 b135sm14659185qka.2 - gsmtp "
Here is my mail.php,
return array(
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail"
|
*/
'driver' => 'smtp',
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Postmark mail service, which will provide reliable delivery.
|
*/
'host' => 'smtp.gmail.com',
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to delivery e-mails to
| users of your application. Like the host we have set this value to
| stay compatible with the Postmark e-mail application by default.
|
*/
'port' => 587,
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => array('address' => '[email protected]', 'name' => 'Mithun'),
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => 'tls',
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
_/
'username' => 'mithun',
/_
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'password' => '??????????',
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Mail "Pretend"
|--------------------------------------------------------------------------
|
| When this option is enabled, e-mail will not actually be sent over the
| web and will instead be written to your application's logs files so
| you may inspect the message. This is great for local development.
|
*/
'pretend' => false,
);
And did you go to the link Google gave you? https://support.google.com/mail/answer/14257
Apologies for all the close+opens. Github was freaking out there for a second.
Hi Snipe,
That's alright.
Yes, I followed all the steps mentioned in the Google support link.
Like, creating App password for Snipe IT (mail.php) or/and using my actual gmail password to the mail.php file.
But result is the same.
Error:
Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/answer/14257 g189sm4257369qhg.2 - gsmtp "
Could you be able to look into this deeply?
Any other way to make this work?
Note: If I use the same credentials to send email through Ubuntu terminal, it
worked.
http://docs.snipeitapp.com/installation/configuration.html#edit-mail-settings
Please see the additional notes on using Gmail.
Thanks for the link.
Those options Like,
Any other suggestions?
No idea. Maybe try this? http://stackoverflow.com/a/26041277/200021
Thanks a lot. . .It worked for me
how to hide password and username if "swift_transportexeption in AbstractSmtpTransport.php line 383" message display
@shahiran12395 turn off debugging. You should never leave debugging on in production.
@snipe i see..i forgot to turn off debugging mode..thanks
enable lesssecure appps in www.myaccount.google.com/lesssecureapps for gmail. it will works
can you help me find this problem?
I think you should check your smtp setting whether your username or
password is wrongly inserted
On Sat, Jul 28, 2018, 12:47 AM sendika06 notifications@github.com wrote:
[image: error]
https://user-images.githubusercontent.com/41359084/43334360-72ee14c6-91f7-11e8-814a-623db346cfb7.PNG
can you help me find this problem?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/snipe/snipe-it/issues/1609#issuecomment-408475793,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQdvvmtFKxX_opRaAQL1y1v8psyL7BMwks5uK0Q3gaJpZM4HCFC1
.
Can refer here for further reading
https://stackoverflow.com/questions/37469770/laravel-swiftmailer-expected-response-code-250-but-got-code-530-with-messag
On Sat, Jul 28, 2018, 12:54 AM muhammad shahiran zabedin <
[email protected]> wrote:
I think you should check your smtp setting whether your username or
password is wrongly insertedOn Sat, Jul 28, 2018, 12:47 AM sendika06 notifications@github.com wrote:
[image: error]
https://user-images.githubusercontent.com/41359084/43334360-72ee14c6-91f7-11e8-814a-623db346cfb7.PNG
can you help me find this problem?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/snipe/snipe-it/issues/1609#issuecomment-408475793,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQdvvmtFKxX_opRaAQL1y1v8psyL7BMwks5uK0Q3gaJpZM4HCFC1
.
after I follow the instructions, which happens like this, so where is the error
Have you enable less secure apps option for your gmail account?
On Sat, Jul 28, 2018, 1:46 AM sendika06 notifications@github.com wrote:
[image: stuck]
https://user-images.githubusercontent.com/41359084/43337969-5fe44898-91ff-11e8-90ff-ba22ec03a3de.PNGafter I follow the instructions, which happens like this, so where is the
error—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/snipe/snipe-it/issues/1609#issuecomment-408490882,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQdvvueJleD1k9gBIebGTVwOSdvJjeuiks5uK1HpgaJpZM4HCFC1
.
I've turned on but the result remains the same
Don't forget to restart your server :smiley:
Stack OverflowI am using Laravel to send out some emails from RoundCube. The trouble is that I keep getting the same error Failed to authenticate on SMTP server with username "[email protected]" using 2