Skip to main content
Topic: Possible Gmail Fix (Read 1720 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Possible Gmail Fix

I can't get my php to send email from my forum due to my server setup so I'll be needing to send email via gmail instead. Unfortunately, I can't get it working either until I digged into this:
Quote from: http://www.simplemachines.org/community/index.php?topic=544856.msg3870010#msg3870010Ok 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.

Gmail now is working for my forum.

Next, should we fix this in ElkArte?

Re: Possible Gmail Fix

Reply #1

Interesting!  Does gmail have volume limitations that you're aware? 

Re: Possible Gmail Fix

Reply #2

They have limits and you can refer them here:

https://support.google.com/a/answer/166852?hl=en

https://support.google.com/a/answer/2956491#sendinglimitsforrelay

I think using gmail in our case is subject to the first one because I think relay is somewhat different (I may be wrong about this :D).


Re: Possible Gmail Fix

Reply #4

Tested and that port 587 is definitely not working with default 107 Mail.subs.php or after the suggested fix. Only port 467 is currently working with the suggested fix.