Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.7.8 Username and Password not accepted after save config on magento2 #7

Closed
knidie opened this issue Feb 29, 2016 · 39 comments
Closed

Comments

@knidie
Copy link

knidie commented Feb 29, 2016

its working before i save the config ,i try the mail setting test and it works ,after i saved the config on magento2 i try again mail test , i get 5.7.8 Username and Password not accepted,how i can fix it

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

What version of 2.x are you using?
Are you using multiple store?

Follow option number 2 https://support.google.com/accounts/answer/6010255 or click on this link https://www.google.com/settings/security/lesssecureapps

@knidie
Copy link
Author

knidie commented Feb 29, 2016

hi
I’m using 2.0.2 version of magento2.
no , i use single-store mode.

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

If you retype the username/password (without saving) does it sill work? Also take a look at https://laracasts.com/discuss/channels/general-discussion/help-email-doesnt-get-sent-with-gmail-smtp

What option is enabled at https://www.google.com/settings/security/lesssecureapps ?

@knidie
Copy link
Author

knidie commented Feb 29, 2016

yes if i retype password without saving the email test will work

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Which option is check at https://www.google.com/settings/security/lesssecureapps?

@knidie
Copy link
Author

knidie commented Feb 29, 2016

for less secure apps was allowed

在 2016年2月29日,下午3:57,R.S notifications@github.com 写道:

Which option is check at https://www.google.com/settings/security/lesssecureapps https://www.google.com/settings/security/lesssecureapps?


Reply to this email directly or view it on GitHub #7 (comment).

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Are you a developer or are you comfortable with making simple code changes so that we can see what the issue is?

@knidie
Copy link
Author

knidie commented Feb 29, 2016

im not a developer but i can try to do it

在 2016年2月29日,下午4:02,R.S notifications@github.com 写道:

Are you a developer or are you comfortable with making simple code changes so that we can see what the issue is?


Reply to this email directly or view it on GitHub #7 (comment).

@knidie
Copy link
Author

knidie commented Feb 29, 2016

what i have to do

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

I want you to check to make sure the password is the same after saving

So go to /Controller/Adminhtml/Test/Index.php

Change

$result = __('Sent... Please check your email') . ' ' . $to;

to

$result = __('Sent... Please check your email') . ' ' . $to . " u: {$username} p: {$password}";

The popup will show you the username and password (remember to change back the code once finish)

Is the username/password correct?

@knidie
Copy link
Author

knidie commented Feb 29, 2016

where i can find this folder ? it is in magento2 root folder?

在 2016年2月29日,下午4:34,R.S notifications@github.com 写道:

I want you to check to make sure the password is the same after saving

So go to /Controller/Adminhtml/Test/Index.php

Change

$result = __('Sent... Please check your email') . ' ' . $to;

to

$result = __('Sent... Please check your email') . ' ' . $to . " u: {$username} p: {$password}";

The popup will show you the username and password (remember to change back once finish)


Reply to this email directly or view it on GitHub #7 (comment).

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Base on which method you use to install it either in app/code/MagePal/GmailSmtpApp or in vender/magento/magento2-gmailsmtpapp

@knidie
Copy link
Author

knidie commented Feb 29, 2016

i just did what you said now ill go test it

在 2016年2月29日,下午4:49,R.S notifications@github.com 写道:

Base on which method you use to install it either in app/code/MagePal/GmailSmtpApp or in vender/magento/magento2-gmailsmtpapp


Reply to this email directly or view it on GitHub #7 (comment).

@knidie
Copy link
Author

knidie commented Feb 29, 2016

without save config test mail popup username and password right, then i save config try test again it popup "5.7.8 Username and Password not accepted. Learn more at 5.7.8 https://support.google.com/mail/answer/14257 https://support.google.com/mail/answer/14257 p125sm16820391wmd.16 - smtp"

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Sorry, undo that change and do this instead

change
$this->getResponse()->setBody($this->makeClickableLinks($result));

to

$this->getResponse()->setBody($this->makeClickableLinks($result) . " u: {$username} p: {$password}");

@knidie
Copy link
Author

knidie commented Feb 29, 2016

the password show like this "p: ��)�����” username is normal

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Does your password contain special characters? Do you know your database character set

@knidie
Copy link
Author

knidie commented Feb 29, 2016

no special characters its normal upcase letter and numbers. i just checked my database character set it is in latin1.

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Try enter your password as abc123 then save and test config. Does it show abc123?

@knidie
Copy link
Author

knidie commented Feb 29, 2016

i input abc123 and save config then password like this "p: �vMu$Yt�"

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Log into your database. Go to core_config_data table then search for system/gmailsmtpapp/password

or

SELECT * FROM mage2.core_config_data where path like '%system/gmailsmtpapp/password%'

Is the password abc123 or does it seem encrypted?

@knidie
Copy link
Author

knidie commented Feb 29, 2016

+-----------+---------+----------+------------------------------+-----------------------------------------------------------------------------------+
| config_id | scope | scope_id | path | value |
+-----------+---------+----------+------------------------------+-----------------------------------------------------------------------------------+
| 55 | default | 0 | system/gmailsmtpapp/password | 0:2:yj8NM0gv9NLiZQv1jucUkiW65op1mOSK:OLWp9C43EfeNwzvTWmVKkWBx5lRULo6dgRMWMy50eog= |
+-----------+---------+----------+------------------------------+-----------------------------------------------------------------------------------+

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Try deleting that row and resave (using the same password as above) and resave

@knidie
Copy link
Author

knidie commented Feb 29, 2016

i can not find how to delete it

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

What program are you use to interact with the db?

@knidie
Copy link
Author

knidie commented Feb 29, 2016

terminal,I’m connect linux server through terminal.

在 2016年2月29日,下午6:55,R.S notifications@github.com 写道:

What program are you use to interact with the db?


Reply to this email directly or view it on GitHub #7 (comment).

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Always backup

DELETE from core_config_data where config_id = 55 LIMIT 1

@knidie
Copy link
Author

knidie commented Feb 29, 2016

+-----------+---------+----------+------------------------------+-----------------------------------------------------------------------------------+
| config_id | scope | scope_id | path | value |
+-----------+---------+----------+------------------------------+-----------------------------------------------------------------------------------+
| 84 | default | 0 | system/gmailsmtpapp/password | 0:2:E4bZE6qPyRJ7FvNMactdYpeVWJQ4L7ug:EZl2XyTl0GFZh0QMekHj/cRyNyRlUuplJ9MA5IMFA0w= |
+-----------+---------+----------+------------------------------+-----------------------------------------------------------------------------------+

在 2016年2月29日,下午7:01,R.S notifications@github.com 写道:

Always backup

DELETE from core_config_data where config_id = 55 LIMIT 1


Reply to this email directly or view it on GitHub #7 (comment).

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

Are you still having issue connecting to gmail?

You issue seem to be encrypting and decrypting not working correctly similar to these issue

magento/magento2#2984

magento/magento2#1223

What version of php are you running?

@knidie
Copy link
Author

knidie commented Feb 29, 2016

i actually using php 7 , is the php7 cause this issue? if i change php to 5.6 it will work normally ?

在 2016年2月29日,下午7:29,R.S notifications@github.com 写道:

Are you still have an issue connecting to gmail?

The issue is cause by encrypting and decrypting not working correctly similar to these

magento/magento2#2984 magento/magento2#2984
magento/magento2#1223 magento/magento2#1223
What version of php are you using?


Reply to this email directly or view it on GitHub #7 (comment).

@srenon
Copy link
Contributor

srenon commented Feb 29, 2016

I think so, can you test on v5.6 and let me know.

On v7 you could also try magento/magento2@32ca5c9 or https://github.com/magento/magento2/pull/3054/files

@knidie
Copy link
Author

knidie commented Feb 29, 2016

sure i’ll let you know. and thank you for all help.

在 2016年2月29日,下午7:46,R.S notifications@github.com 写道:

I think so, can you test on v5.6 and let me know.

On v7 you could also try magento/magento2@32ca5c9 magento/magento2@32ca5c9 or https://github.com/magento/magento2/pull/3054/files https://github.com/magento/magento2/pull/3054/files

Reply to this email directly or view it on GitHub #7 (comment).

@knidie
Copy link
Author

knidie commented Mar 1, 2016

fix the issue on php7 with link you give me, now working fin.
tested with php 5.6 ,no issue fund.

@knidie knidie closed this as completed Mar 1, 2016
@knidie knidie reopened this Mar 1, 2016
@srenon
Copy link
Contributor

srenon commented Mar 1, 2016

Are you still having issues (since you close and then reopen this issue)?

@knidie
Copy link
Author

knidie commented Mar 1, 2016

how can i configure this app send different email addresses, like ”noreply@gmail.com”send email for account registration ,”support@gmail.com”for support.

在 2016年3月1日,下午3:24,R.S notifications@github.com 写道:

Are you still having issues?


Reply to this email directly or view it on GitHub #7 (comment).

@srenon
Copy link
Contributor

srenon commented Mar 1, 2016

This work exactly the same as default magento, therefore it will use whatever is set in magento

For example in contact

image

Will using the information in "Custom Email 2"

image

Anything default magento support this will support, other wise you will need to customize base magento to add these functionalities.

@srenon srenon closed this as completed Mar 1, 2016
@knidie
Copy link
Author

knidie commented Mar 1, 2016

maybe i didn’t explain well, i have multi gmail addresses, i want use my owner@gmail.com for general contact sender mail, and support@gmail.com as customs support sender mail ,is that possible.

在 2016年3月1日,下午3:50,R.S notifications@github.com 写道:

This work exactly the same as default magento, therefore it will use whatever is set in magento

For example in contact

https://cloud.githubusercontent.com/assets/1415141/13428598/833617ca-df89-11e5-9d90-1716fe11a8bd.png
Will using the information in "Custom Email 2"

https://cloud.githubusercontent.com/assets/1415141/13428565/45337b2a-df89-11e5-8600-01eef8c35cf0.png

Reply to this email directly or view it on GitHub #7 (comment).

@srenon
Copy link
Contributor

srenon commented Mar 1, 2016

No, that not possible because you would need to setup two set of user name and password.

You could setup a 'no-reply@company.com' then have the reply-to set to the different email address (as shown in the previous email). The original message won't be send thru that email but all other correspondent

@knidie
Copy link
Author

knidie commented Mar 1, 2016

I see, i have no more questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants