Starting February 15, 2021, G Suite accounts will only allow access to apps using OAuth. Password-based access will no longer be supported. We have some sites that are set to use a Google Suite e-mail account ins the CMS mail settings. I think this change by Google will stop this mail setup from working?
I am not a developer and not sure how this can / should be approached, but maybe there is a way to support Oauth in the mail settings in Joomla? Even if there might be an other solution (setting like 'use less secure apps') in Google Suite it might be something that will come up in the future anyway?
Labels |
Added:
?
|
I recently created a new site and can no longer send mail. I do not can pass identification. Perhaps it will be for old sites from 2021, but I already have a problem - I can not send letters from my new website.
Can you implement OAuth 2.0 as soon as possible?
@sanek4life did you follow the instructions because it works perfectly for me https://docs.joomla.org/How_do_I_use_Gmail_as_my_mail_server%3F
@brianteeman Any chance you can provide an update on this as to whether or not Joomla will eventually support OAuth2 for mail sending?
If so, what is the potential timeline?
I don't get email notifications on this repository anymore but randomly pinging people in hopes that it will expedite a feature request in an entirely volunteer driven software platform isn't going to get you an answer any faster or the request completed any sooner. You're basically at the mercy of hoping someone volunteers to give up their time to either provide a fix to the upstream PHPMailer library or give up their time to provide a fix to the Joomla application.
@mbabker WOW, Someone woke up on the wrong side of the bed today. I didn't randomly ping anyone, I knew exactly who I was pinging. I knew of your involvement with the Joomla project but was unaware you were no longer associated with it in any official capacity. I am also well aware that Joomla is Open Source and volunteer driven. It was only a question, not intended to pressure anyone. I did not demand anything, and I was not looking for an expedited feature request. I was only asking a simple question for an official response on the issue since the issue was opened 20 days ago and didn't yet have one. In any case, sorry to have bothered you.
About the issue, thanks to the help of a friend, I found that Joomla already supports OAuth2.
libraries/vendor/phpmailer/phpmailer/class.phpmaileroauth.php
However, there is no interface for it in Global Configuration when selecting PHP for sending mail.
Status | New | ⇒ | Confirmed |
@sanek4life did you follow the instructions because it works perfectly for me https://docs.joomla.org/How_do_I_use_Gmail_as_my_mail_server%3F
@brianteeman I use this instruction and all the settings that are indicated there, but I can not send a test letter from my website.
I recently created a new website and did everything as usual, but letters are not sent.
I use G Suite https://gsuite.google.com/, and it does not support Application Specific Password (ASP):
On the "Signing in to Google" panel, choose App Passwords. If you don’t see this option:
2-Step Verification is not set up for your account.
2-Step Verification is set up for security keys only.
Your account is through work, school, or other organization.
You’ve turned on Advanced Protection for your account.
Source: https://support.google.com/accounts/answer/185833
Thus, I can’t set up sending letters from my website if I use two-factor authorization in G Suite.
I cannot create a password here: https://myaccount.google.com/apppasswords
It says that this setting is not available for my account.
OAuth 2.0 Mechanism: https://developers.google.com/gmail/imap/xoauth2-protocol
@sanek4life I forgot to update this after I had replied previously. I was able to speak with a Google G Suite support representative about this because I have a non-profit client that uses G Suite. Long story short,
All you need to do to be able to use App Passwords is to turn on 2-Step Verification. Once you turn on 2-SV you will see the option to create an App Password. Then you can add that App Password to the mail settings of your Joomla site and everything will continue to work fine. Though a word of caution here, once you enable 2-SV, it will automatically disable Less Secure Apps, which means your Joomla website will not be able to send mail on behalf of your domain via G Suite until you create an App Password and add it to the mail settings in the sites Global Configuration.
So moving forward the best practice would be that if someone is going to use a Google mail service for sending mail from Joomla, whether it is G Suite or a Gmail email account, they should enable 2-Step Verification, and create an App Password for use with the mail settings in the Global Configuration. Once this is officially mandatory by Google, this will be the only way unless something changes with Joomla.
Also tagging @jjnxpct @HLeithner @brianteeman
@N8Solutions At last! I was able to send a message from my website! I turned on two-factor authorization at G Suite, and then created the application password.
But in G Suite it is more difficult to enable two-factor authorization than in a regular Gmail account. I think it will be possible to supplement this instruction - https://docs.joomla.org/How_do_I_use_Gmail_as_my_mail_server%3F
@sanek4life it is a wiki so feel free to update it
Hi! We also are able to send mail after turning on 2FA (always good to do to make it more secure) and creating an app-password. Once you know how to do this it's not that hard:
But I do think OAuth would be more secure. Google states: "App Passwords aren’t recommended and are unnecessary in most cases. To help keep your account secure, use "Sign in with Google" to connect apps to your Google Account."
I am not a programmer so I can't get this done. So maybe someone else can have a look at this. In the mean time the app password is the way to go if the 'less secure apps' option does not work anymore. (I believe it's already disabled for new users).
I think this work the same for Office 365. But I have not tried this. I also don;t know if implementing OAUTH would work similar for other e-mail services. I think it will....
I have followed all of the instructions but still can not get Joomla to send mail through GMail. I configured Thunderbird and it works but it has the option to use "OAuth2" which Joomla does not. I enabled 2-factor and generated the app password but still no good. The response is...
Notice
SMTP connect failed https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Error
Test mail could not be sent.
Very frustrating. There should just be an option for OAuth2 in Joomla.
For those who say "...all you need to do" or "...it works perfectly..." ...I'm sorry but you are mistaken.
I have followed all of the instructions but still can not get Joomla to send mail through GMail. I configured Thunderbird and it works but it has the option to use "OAuth2" which Joomla does not. I enabled 2-factor and generated the app password but still no good. The response is...
Notice
SMTP connect failed https://github.com/PHPMailer/PHPMailer/wiki/TroubleshootingError
Test mail could not be sent.Very frustrating. There should just be an option for OAuth2 in Joomla.
For those who say "...all you need to do" or "...it works perfectly..." ...I'm sorry but you are mistaken.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27295.
Hello @liquidpurple, I'm sorry you are having issues. However, you either did not follow the instructions properly or you do not have the mail settings entered correctly.
Please have a look at this photo and check your mail settings again. If they match, then go back through the instructions to make sure you didn't miss a step. I have done this on countless sites for G Suite (now Google Workspace) and it works every single time.
Hello @N8Solutions, thank you for trying to assist me, I appreciate that. However, you're being a bit presumptuous with your statement "...you either did not follow the instructions properly or you do not have the mail settings entered correctly..." as those are definitely not the only options AND there is ZERO chance that I did not enter the information correctly or follow the instructions exactly as listed (if these are the instructions you are referring to: https://docs.joomla.org/How_do_I_use_Gmail_as_my_mail_server%3F). In fact, I have tried all possible variations of the available options and nothing works.
Perhaps there is an issue with the server??
Perhaps the instructions show invalid options??
Perhaps there is an issue with Joomla??
Perhaps there is some strange conflict with extensions??
Perhaps a file has been corrupted??
Perhaps there is an issue with the GMail config??
Perhaps you got lucky on countless sites??
Is it supposed to be SSL/TLS on port 465 or STARTTLS on 567 or 25, ...or does it not matter?
Is it GMail email/pass or Google App Password?
...as I previously stated, I entered the gMail credentials in Thunderbird and it works as expected but when I enter those SAME credentials in Joomla, I get the errors referenced "SMTP connect failed."
I was able to ping smtp.gmail.com from the server so the connection is not blocked.
I have verified that openssl is installed and working on the server.
Can anybody provide helpful information on how I can diagnose the issue I'm experiencing?
@liquidpurple Apologies for coming off that as it was not my intention. Have you checked this on the server.
Hello @N8Solutions, apology accepted. Yes, openssl is enabled in php.
Ah ha! I installed PHP mailer on the server (https://github.com/PHPMailer/PHPMailer) and it generated a response code "SMTP ERROR: Failed to connect to server: Connection refused (111)" which told me that I would need to disable "SMTP Restrictions" from the server.
Unfortunately, my client is on a GoDaddy shared server and according to their "Tier-Two" support department, they do not allow access to 3rd-party smtp servers such as GMail or mail relays.
Mystery solved!
If your site is hosted on a GoDaddy shared server then you may not be able to use a 3rd-party smtp server such as GMail.
Time to upgrade the server perhaps.
its less of a shared server issue and more of a godaddy issue.
Labels |
Added:
No Code Attached Yet
Information Required
Removed: ? |
Labels |
Added:
Documentation Required
Removed: Information Required |
This issue has a documentation required tag but the documentation exists
https://docs.joomla.org/How_do_I_use_Gmail_as_my_mail_server%3F
This issue has a documentation required tag but the documentation exists
https://docs.joomla.org/How_do_I_use_Gmail_as_my_mail_server%3F
I believe the original issue with the documentation, and the reason this ticket was raised in the first place, was not that the documentation didn’t exist, but rather that Google had notified everyone that password based access would no longer work for G Suite accounts and that they would only allow access to apps using OAuth.
Before this announcement from Google, not everyone was using 2FA with App Passwords. So for those that were forced to make the change, and for the rest of us already using App Passwords, it was unclear how to use OAuth with Joomla and Gmail/Google Workplace and whether or not App Passwords were considered to be OAuth. However, I was able to clear that up with a phone call to Google as I outlined in my response above.
#27295 (comment)
EDIT
@brianteeman After reviewing the documentation I saw that a small update was needed. It says for the “SMTP Password” to enter “your Gmail password”, when right above that it mentions that an “App Specific Password” is needed. This could confuse some people so I updated the documentation to specify that they enter the generated app specific password.
Labels |
Added:
?
|
Reading through all of this thread it appears to be about the documentation which has now been upda5ted so this can be closed.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-04-10 15:32:40 |
Closed_By | ⇒ | Quy |
Thanks for the info, hopefully someone come up with a PR till the end of 2020.