• Welcome to Simple Machines Community Forum. Please login or sign up.

Anybody having recent issues with gmail?

Started by Jailer, April 02, 2016, 07:02:20 PM

Previous topic - Next topic

Samker

Quote from: CoDTurkiye on April 11, 2016, 09:44:44 AM
Thanks, working with gmail.

Quote from: Shambles on April 11, 2016, 09:28:16 AM
Ok I have found a resolution to this problem, which requires a minor code change.

The clue was in this post here:

EHLO invalid argument in ssmtp


What I've done is edit Sources/Subs-Post.php as follows:

Code (Find) Select
// EHLO could be understood to mean encrypted hello...
if (server_parse('EHLO ' . $modSettings['smtp_host'], $socket, null) == '250')




Code (Replace With) Select
// EHLO could be understood to mean encrypted hello...
// if (server_parse('EHLO ' . $modSettings['smtp_host'], $socket, null) == '250')
if (server_parse('EHLO ' . 'localhost', $socket, null) == '250')



All seems to be working now.

Confirmed, it's working now with my Google Apps as well.  ;)

THANKS!
Samker's Computer Forum - SCforum.info

Raffaele1977

MacOsX - 11.6
SMF 2.0.15
Safari (last) or Chrome (last)

Jailer

I've already moved on to mailgun and it's working great for me but for Shambles I say:





JG00

Much thanks to Shambles and anybody else who helped him.

Seconding Jailer's many thumbs ups.

Sudhakar Arjunan

Quote from: CoDTurkiye on April 11, 2016, 09:44:44 AM
Thanks, working with gmail.

Quote from: Shambles on April 11, 2016, 09:28:16 AM
Ok I have found a resolution to this problem, which requires a minor code change.

The clue was in this post here:

EHLO invalid argument in ssmtp


What I've done is edit Sources/Subs-Post.php as follows:

Code (Find) Select
// EHLO could be understood to mean encrypted hello...
if (server_parse('EHLO ' . $modSettings['smtp_host'], $socket, null) == '250')




Code (Replace With) Select
// EHLO could be understood to mean encrypted hello...
// if (server_parse('EHLO ' . $modSettings['smtp_host'], $socket, null) == '250')
if (server_parse('EHLO ' . 'localhost', $socket, null) == '250')



All seems to be working now.

I should thank you CoDTurkiye , which i was searching from march 29, 2016 till now for 2 months.

Also thank you Irisado for getting me to the right topic.

Amazingly worked in smtp via gmail.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Shambles


Tiribulus

Do you still have to do the enable for other devices thing with this code change?
Thanks

Tiribulus

Let me please just ask plainly then. How does one get gmail to work these days? I have mine set to ssl://smtp.gmail.com, port 587 and I get the following errors:



I tried it without the ssl:// prefix and the mails still don't send.  I have done the edit of Sources/Subs-Post.php as per above on this page. I have other related errors in the log on that as well now, but those might not matter.  I have 3 wordpress blogs on that same self hosted server, all using gmail to send notifications and it works fine.

Any help with this would be greatly appreciated.
Thanks again.

Shambles


Tiribulus

Thank you sir. Does this mean that if I use the tls prefix If I do use port 587? Will ssl work with gmail if I use port 465? gmail to specify tls and 587, but I saw somebody saying to try tls:// It's kinda confusing for us non encryption experts.

Of course all I care about is that he notifications send. Thank you again for your help  :)

Kindred

Quote from: Shambles on April 11, 2016, 09:28:16 AM
Ok I have found a resolution to this problem, which requires a minor code change.

The clue was in this post here:

EHLO invalid argument in ssmtp


What I've done is edit Sources/Subs-Post.php as follows:

Code (Find) Select
// EHLO could be understood to mean encrypted hello...
if (server_parse('EHLO ' . $modSettings['smtp_host'], $socket, null) == '250')




Code (Replace With) Select
// EHLO could be understood to mean encrypted hello...
// if (server_parse('EHLO ' . $modSettings['smtp_host'], $socket, null) == '250')
if (server_parse('EHLO ' . 'localhost', $socket, null) == '250')



All seems to be working now.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Shambles

Quote from: Tiribulus
Does this mean that if I use the tls prefix If I do use port 587? Will ssl work with gmail if I use port 465? gmail to specify tls and 587, but I saw somebody saying to try tls:// ...

No. There's code in SMF to detect port 465 and a SSL:// prefix, there's no handler for TLS://

Just set SSL://smtp.gmail.com and port 465.

In addition, I recommend setting 2FA within your gmail account and use a generated "app password" for your SMF.

Tiribulus

Quote from: Shambles on May 21, 2016, 12:24:48 PM
In addition, I recommend setting 2FA within your gmail account and use a generated "app password" for your SMF.
Again, I appreciate your guys help. I also would appreciate your patience with my ignorance. I don't know what the statement quoted above means. I've spent 15 minutes clicking every link in my google account and don't see anything like these.  What is "2FA" and where do I get this password? I fully realize this is not google supports here and that SMF is free software and am accordingly demanding nothing. If you would nonetheless be so good as to direct me further, or in some other way to get mail notifications to work, I would continue to be very very appreciative.
Thank you yet again.

Shambles

2FA = Two Factor Authentication

You can set this via your google settings (you'll need to explore the security/login options) but it's not mandatory, just a suggestion.

Tiribulus

Quote from: Shambles on May 21, 2016, 05:54:01 PM
2FA = Two Factor Authentication

You can set this via your google settings (you'll need to explore the security/login options) but it's not mandatory, just a suggestion.
I'm afraid to mess with the google settings because of what it might do to the WordPress sites on this server to be honest.

I have done your edit to the Sources/Subs-Post.php file as I said before. I assume this is still necessary.

Shambles

Quote from: Tiribulus
I'm afraid to mess with the google settings ...

Then just create a new gmail account, say tiribulus.forums@gmail.com and use that as a test.

And yes, the file edit is still required.

Tiribulus





I'll be honest with you. I can't stand Gmail. I'd never touch it again if I had a choice. The account already in use is only used for sending notifications for the wordpress blogs. I don't think I've sent a message on it for 2 or 3 years. If I knew of some other service not requiring this hoop jumping festival, I'd use it in a second. Personally I don't need the extra secure 2 step verification unless it were required to get this working so I'd rather if possible use the existing account.

Above please see the relevant screens. The password is definitely correct. I might wonder if it were the older version of PHP I have, but as I say, all 3 WordPress blogs on this same server send fine with this exact gmail account..


I apologize for being a pain and reiterate yet again how much I appreciate the help.

Jailer

Switch to mailgun. I haven't had a single issue since I made the change.

Tiribulus

I appreciate that friend, but mailgun costs money I don't have. I'm hosting this as a favor for a friend who also won't be able to pay for a service. Is it possible that version v5.3.8 of PHP works with Wordpress, but not with SMF? I can't upgrade that right at the moment either.

Here are the WordPress settings that work on that same server.

Advertisement: