Friday, 26 October 2018

How to fix error with sending email using gmail?

I want to send email in my php/laravel app in ubuntu 18 under Digital Ocean and I found this https://semantiko.com/how-to-fix-php-mail-function-on-ubuntu-server/ article I filled related config files and send several email and I found in console:

grep -riI ssmtp /var/log
...
/var/log/mail.log:Oct 24 14:05:22 nsn-do-lamp sSMTP[16500]: SSL connection using ECDHE_RSA_CHACHA20_POLY1305
/var/log/mail.log:Oct 24 14:05:22 nsn-do-lamp sSMTP[16500]: Authorization failed (534 5.7.14  https://support.google.com/mail/answer/78754 b5-v6sm5187045wrr.94 - gsmtp)
/var/log/mail.log:Oct 24 14:05:23 nsn-do-lamp sSMTP[16502]: Creating SSL connection to host
/var/log/mail.log:Oct 24 14:05:23 nsn-do-lamp sSMTP[16502]: SSL connection using ECDHE_RSA_CHACHA20_POLY1305
/var/log/mail.log:Oct 24 14:05:23 nsn-do-lamp sSMTP[16502]: Authorization failed (534 5.7.14  https://support.google.com/mail/answer/78754 t198-v6sm6776812wmd.9 - gsmtp)
/var/log/dpkg.log:2018-10-24 05:27:56 install ssmtp:amd64 <none> 2.64-8ubuntu2
/var/log/dpkg.log:2018-10-24 05:27:56 status half-installed ssmtp:amd64 2.64-8ubuntu2
/var/log/dpkg.log:2018-10-24 05:27:56 status unpacked ssmtp:amd64 2.64-8ubuntu2
/var/log/dpkg.log:2018-10-24 05:27:56 status unpacked ssmtp:amd64 2.64-8ubuntu2
/var/log/dpkg.log:2018-10-24 05:27:56 configure ssmtp:amd64 2.64-8ubuntu2 <none>
/var/log/dpkg.log:2018-10-24 05:27:56 status unpacked ssmtp:amd64 2.64-8ubuntu2
/var/log/dpkg.log:2018-10-24 05:27:56 status unpacked ssmtp:amd64 2.64-8ubuntu2
/var/log/dpkg.log:2018-10-24 05:27:56 status unpacked ssmtp:amd64 2.64-8ubuntu2
/var/log/dpkg.log:2018-10-24 05:27:56 status half-configured ssmtp:amd64 2.64-8ubuntu2
/var/log/dpkg.log:2018-10-24 05:27:56 status installed ssmtp:amd64 2.64-8ubuntu2
/var/log/syslog.1:Oct 24 05:34:07 nsn-do-lamp sSMTP[10100]: Creating SSL connection to host
/var/log/syslog.1:Oct 24 05:34:07 nsn-do-lamp sSMTP[10100]: SSL connection using ECDHE_RSA_CHACHA20_POLY1305
/var/log/syslog.1:Oct 24 05:34:07 nsn-do-lamp sSMTP[10100]: Authorization failed (534 5.7.9  https://support.google.com/mail/?p=WebLoginRequired 130-v6sm4756430wmn.7 - gsmtp)

and under my account in https://mail.google.com I found email :

Sign-in attempt was blocked
myaccount@gmail.com
Someone just used your password to try to sign in to your account from a non-Google app. Google blocked them, but you should check what happened. Review your account activity to make sure no one else has access.
CHECK ACTIVITY

Clicking on "CHECK ACTIVITY" button next page was opened https://imgur.com/a/fUKlJgO and I want TO PERMIT my account or me, to be used so I click on "NO, SECURE ACCOUNT" and next page is opened https://imgur.com/a/LfIDTB4

that was rather strange for me, as I do not need to change the password. I want to permit mail service to use my gmail.com account.

Can you say what is wrong ?
Did I misunderstand gmail messages ?

MODIFIED BLOCK # 2 I tried to follow the provided link and I opened the next instructions :

Use this setting when you want to ensure that access by a less secure app is unavailable to all. Sign in to your Google Admin console. Sign in using an administrator account, not your current account MyNick@gmail.com

... Who is my administrator? Quick definition: A person who manages Google services or devices for a company, school, or group. Someone in your company, school, or group Your current account, MyNick@gmail.com, isn’t managed by an administrator. The account isn’t associated with any company, school, or group. Instead, it’s a free Google Account that you can manage yourself.

But reading the docs I missed as I am free Google Account is there is a way to make myself as administrator? If yes, please point where and how ?

Thanks!



from How to fix error with sending email using gmail?

No comments:

Post a Comment