I've been using SMTP (in the store settings) with Google to send my emails, since way back in the day I had major issues with the PHP mail -- getting sent to spam most of the time, if the email was even generated in the first place. Maybe v3.x is better, idk... but I'd rather have my emails sent from my domain, signed and trusted.
I just received a notice from Google that they'll be shutting off all username/password access for apps and only allowing OAuth connections.
Is there anything that can be done to accommodate this? Or am I screwed and will have to go back to PHP mail?
Thanks guys,
Amanda
what I do not understand is
and then you use gmail.but I'd rather have my emails sent from my domain, signed and trusted
Oauth2 uses client id's, client secrets and tokens instead of username/password and needs to be setup in your google account developer console.
And no, default OC mail classes do not support this, you woud have to implement PHPMailer 5.2.11 or higher or some other software.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Both Gsuite and Gmail allow you to send from an email address @yourdomain.com.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
I just remember having issues with php mail back in the day when I set up my original OC v1.5.5.1 website, but I can't remember exactly what it was.... I think it was mostly unreliable-- I swear it would skip sending the emails quite often, so I switched it to SMTP settings direct in the admin panel store settings. I also had major issues with emails going to spam, but I think I resolved that with DKIM on the domain/server side of things.
Thanks for your answers!
I remember having to enable Less Secure Apps in order for OpenCart's SMTP mail function to work, since it uses a username and password for SMTP connection.Dear Administrator,
We’re constantly working to improve the security of your organization’s Google accounts. As part of this effort, and in consideration of the current threat landscape, we’ll be turning off access to less secure apps (LSA) — non-Google apps that can access your Google account with only a username and password, without requiring any additional verification steps. Access through only a username and password makes your account more vulnerable to hijacking attempts. Moving forward, only apps that support a more modern and secure access method called OAuth will be able to access your G Suite account.
I'm just wondering if this means I'll need to switch back to PHP Mail option, and what that means for my emails.
Links regarding the new protocol:
https://developers.google.com/gmail/api/quickstart/php
https://github.com/PHPMailer/PHPMailer/ ... th-XOAUTH2
Thank you

Difference is that SMTP has more functionality and error handling wheras php mail is basically a black hole.
On the other hand, SMTP is slower (because of better functionality and error handling) and was therefore never intended for online web usage because of the impact on page response times.
Why not ask Gmail Suite before switching everything first.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
If you don't want to have a custom mail class written for OAUTH, you may want to look into MailGun or SendGrid which might better serve your needs. I personally would choose SMTP any day over PHP's mail function, especially if on a shared host.Girlinabillion wrote: ↑Sun Dec 22, 2019 11:42 amI'm just wondering if this means I'll need to switch back to PHP Mail option, and what that means for my emails.
Backup and learn how to recover before you make any changes!
It looks like MailGun and SendGrid are more geared toward sending out emails, is that correct? I only need to worry about receiving emails.
I'll see if I can contact Google help-- but they're such a huge company, support usually sucks. I might consider switching to my host- would probably save me some money too.
To maintain compatibility with G Suite accounts, update your app to use OAuth 2.0 as a connection method. To get started, follow our developer guide on using OAuth 2.0 - https://developers.google.com/identity/protocols/OAuth2 to access Google APIs. You can also refer to our guide on OAuth 2.0 for mobile & desktop apps.- https://developers.google.com/identity/ ... stalledApp.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I'll look into that- thank youstraightlight wrote: ↑Mon Dec 23, 2019 1:43 amSimply use their PHP vendors package from Github: https://github.com/googleapis/google-api-php-client . You can then upload this package under your vendor folder as a sub-folder and integrate the examples folder as an extension in your store.
Users browsing this forum: No registered users and 8 guests