Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: seadhna on January 19, 2024, 11:12:36

Title: Google Workspace accounts will only allow access to apps using OAuth.
Post by: seadhna on January 19, 2024, 11:12:36
I am wondering if this affects Elxis email configuration (to send emails via Elxis from a Google Workspace (aka Gsuite) mailbox.

I got this email from Google this morning:

Beginning September 30, 2024 - Access to LSAs (less secure apps) will be turned off for all Google Workspace accounts. CalDAV, CardDAV, IMAP, and POP will no longer work when signing in with just a password — you will need to login with a more secure type of access called OAuth.

In order for your end users to continue using these types of apps with their Google Workspace accounts, they must switch to a more secure type of access called OAuth (a list of affected users is attached). This authentication method allows apps to access accounts with a digital key instead of requiring a user to reveal their username and password. We recommend that you share the user instructions (in this PDF file) with individuals in your organization to help them make the necessary changes. Alternatively, if your organization is using custom tools, you can ask the developer of the tool to update it to use OAuth. Developer instructions are also in this PDF file. https://services.google.com/fh/files/emails/b_298235749.pdf
Title: Re: Google Workspace accounts will only allow access to apps using OAuth.
Post by: seadhna on January 19, 2024, 11:13:49
(Until now, I can only use Google Workspace mailboxes in Elxis if I have said "Allow less secure apps" in the mailbox settings.)
Title: Re: Google Workspace accounts will only allow access to apps using OAuth.
Post by: datahell on January 21, 2024, 10:29:18
Noted and I will check it for the next Elxis update.

However I strongly recommend NOT TO USE GMAIL especially if you have a business website like e-shop, bookings, corporate site, etc. It is very bad for your customers to receive emails from gmail rather than your domain name. Consider you shop from amazon.com, you pay and you receive email from something@gmail.com. Also it is not secure to rely on third parties for such things.
Title: Re: Google Workspace accounts will only allow access to apps using OAuth.
Post by: seadhna on January 25, 2024, 15:51:03
Great!
Google Workspace is the professional version of Gmail that allows you to use your own domain name.
Title: Re: Google Workspace accounts will only allow access to apps using OAuth.
Post by: datahell on January 25, 2024, 22:01:31
Even in this case I still don't get why to use Gmail. Guys think of privacy and independence...
Avoid sharing anything personal/professional with third parties (as you understand I am an anti-social media guy  :D) .
Title: Re: Google Workspace accounts will only allow access to apps using OAuth.
Post by: seadhna on February 01, 2024, 12:18:31
I suppose the main reason I started using Google Workspace for email (back when it was called GSuite) many years ago, was for their junk-filtering. My inbox doesn't get flooded with nonsense emails about Viagra etc. If I would use the email service built into cPanel, thank junk just not get sent to the Spam folder.
Title: Re: Google Workspace accounts will only allow access to apps using OAuth.
Post by: datahell on February 01, 2024, 20:00:44
1. Never post your email address in public, not even in your site. This is how you protect it from been indexed by spam crawlers. Use a contact form instead and customers will be able to contact you just fine. If your email has been added to a spam sender list it is dead. Although if you have a good junk filter you will receive no junk emails.

2. SMTP email settings are for SENDING emails from the site, not for receiving. So the spam filter you are talking about doesn't count. Use a local SMTP account for the site to send emails with your company's domain. Your customers will get notifications from something@example.com. Now, if you don't want to use something@example.com but your gmail instead, or any other email, add a forwarder from something@example.com to your gmail. If a customer replies to your company email you will receive it in gmail. And that's all.
Title: Instructions for using Gmail with Elxis
Post by: datahell on April 06, 2024, 20:52:40
I did a full check to day and I see that gmail is working fine with the current version of Elxis. There is only a small issue that is fixed in Elxis 5.5.
If you want to send e-mail from Elxis using your gmail account follow my instructions below.


Gmail setup on Elxis
Go to Elxis configuration > Tab E-mail. Set the following:

Send method: SMTP - Gmail (just SMTP works too)
Sender e-mail: Your gmail e-mail (something@gmail.com)
Host: smtp.gmail.com
Port: 567
Secure connection: TLS
Authentication required: Yes
Authentication method: Default
Username: Your gmail e-mail (something@gmail.com)
Password: leave it as is for now. We will come back to that later.
Save settings.

Go and login to your gmail.
Click your logo icon on top right corner and select Manage google account (or something like that).
Click on "Security" on left vertical menu.
Enable 2 factor authentication (important).
Visit this page: https://myaccount.google.com/apppasswords (https://myaccount.google.com/apppasswords)
Type a name for a new APP and click "Create"
A small window will popup with a password for your new APP. It will be something like that: xybo lwqx zvxa umgp (note the space at the end!)
Copy that password and click finish.

Go back to Elxis administration, Settings > Email tab.
Scroll down to password field and paste the password from Google app you created previously.
Click Apply and test sending email.

If it doesn't work it is due to the space at the end of the password. Elxis removes it (fixed in Elxis 5.5) and you must restore it. Do that:
Open file configuration.php find MAIL_SMTP_PASS option and paste the password there with the space at the end.

private $MAIL_SMTP_PASS = 'xybo lwqx zvxa umgp ';

Refresh Elxis configuration dont type anything in password (leave it empty). Click to test sending email again, it will work!

Note: Elxis Team is not responsible for third parties' services. Do not rely on third parties if you can avoid it. We don't recommend using gmail, not from Elxis, not from anywhere. We advise you to use an SMTP account on your domain instead.
Title: Re: Google Workspace accounts will only allow access to apps using OAuth.
Post by: seadhna on April 10, 2024, 11:35:26
Awesome, as always!