Post by Girlinabillion » Thu Dec 19, 2019 11:43 am

Hi,

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

New member

Posts

Joined
Sun Jun 02, 2013 12:08 pm

Post by letxobnav » Thu Dec 19, 2019 12:17 pm

Gmail generally tags mail as spam or caution when the from address does not match the smtp username@hostname used for authentication.

what I do not understand is
but I'd rather have my emails sent from my domain, signed and trusted
and then you use gmail.

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.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Thu Dec 19, 2019 7:36 pm

letxobnav wrote:
Thu Dec 19, 2019 12:17 pm
what I do not understand is
but I'd rather have my emails sent from my domain, signed and trusted
and then you use gmail.
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


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Girlinabillion » Sun Dec 22, 2019 11:30 am

Maybe I don't understand how php mail works. If I set my store settings back to php mail, will it use my Google suite mail which is set up to manage my domain email? What email will it send from? And will the reply-to email still be set to whatever the customer enters as their email address in the contact form? I'm using Journal 3 if that makes a difference.

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!

New member

Posts

Joined
Sun Jun 02, 2013 12:08 pm

Post by Girlinabillion » Sun Dec 22, 2019 11:42 am

This is the message I got from Google:
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 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.

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 :)

New member

Posts

Joined
Sun Jun 02, 2013 12:08 pm

Post by letxobnav » Sun Dec 22, 2019 12:07 pm

I don't know if gmai suite accepts non-SMTP protocol but php mail uses the same email address for from and reply as SMTP.

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.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by sw!tch » Sun Dec 22, 2019 6:57 pm

Girlinabillion wrote:
Sun Dec 22, 2019 11:42 am
I'm just wondering if this means I'll need to switch back to PHP Mail option, and what that means for my emails.
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.

Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by Girlinabillion » Mon Dec 23, 2019 1:10 am

Thank you.

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.

New member

Posts

Joined
Sun Jun 02, 2013 12:08 pm

Post by Girlinabillion » Mon Dec 23, 2019 1:27 am

Yeah... This is the response from Google Support:
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.

New member

Posts

Joined
Sun Jun 02, 2013 12:08 pm

Post by straightlight » Mon Dec 23, 2019 1:43 am

Simply 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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Girlinabillion » Mon Dec 23, 2019 2:36 am

straightlight wrote:
Mon Dec 23, 2019 1:43 am
Simply 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.
I'll look into that- thank you

New member

Posts

Joined
Sun Jun 02, 2013 12:08 pm
Who is online

Users browsing this forum: No registered users and 6 guests