Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: Night09 on October 19, 2009, 09:56:10 PM

Title: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Night09 on October 19, 2009, 09:56:10 PM
How to set up Gmail on your forums!

Please be aware recent Google changes mean you need to log into your Google control panel and set App security lower or you wont be able to send mail and you will get what appears as invalid login attempts. You can set up two stage login if you wish but this is only so you understand the reason why you may not be able to send mail.

Ive seen a few people looking for information about this recently and also faced this problem myself when it comes to setting up a gmail account to run from your forums.

There are 2 ways to do this really depending on how you decide to set this up.

1: You use a single address you have made from a google invatation like [email protected]
2: You set up a domain with google apps so you have your own domain like [email protected]

The basic SMF side will be the same for both really but with the google apps you can have up to 50 email addresses free with your sites url for the addresses.If you dont need that you use a single address you set up.

How to set it up for your forums using a single gmail account

Make a new email for your forums ensuring it has a decent password.
Login to your SMF Admin panel and open Server settings > Feature configuration

Set Mail type to:             SMTP
Set SMTP server to:         ssl://smtp.googlemail.com
Set SMTP port to:            465
Set SMTP username to:     [email protected]
Set SMTP password to:     Your email password
Confirm the password
Save the settings.

If you run Apache server ensure php_openssl is enabled in your php extensions or you wont be able to send mail using ssl://

If the above is done correctly you should now be able to let the forums send mail to verify accounts or newsletters ect.

The second way using your own domain is as follows

Create an account with google apps here http://www.google.com/apps/intl/en/group/index.html (http://www.google.com/apps/intl/en/group/index.html)  You need your own url for this.

Once the account is created then if your on hosting it will give you the details of how to link to your host site.
If you own your own urls then you need to login to your url control panel and set the following MX records,They can be found under DNS settings:

(Save after each new MX entry,do not change the order of the contents,Make sure the . is on them all)


NAME:                                    PRIORITY:
ASPMX.L.GOOGLE.COM.                   10
ALT1.ASPMX.L.GOOGLE.COM.            20
ALT2.ASPMX.L.GOOGLE.COM.            20
ASPMX2.GOOGLEMAIL.COM.              30
ASPMX3.GOOGLEMAIL.COM.              30



You then need to set up a new CNAME entry with mail as the name and ghs.google.com. as the content.

On your forums you need to follow the steps above but replace the email address with your new domain one as follows:

Login to your SMF Admin panel and open Server settings > Feature configuration


Set Mail type to:                          SMTP
Set SMTP server to:                     ssl://smtp.googlemail.com
Set SMTP port to:                        465
Set SMTP username to:                 [email protected]
Set SMTP password to:                 Your email password
Confirm the password
Save the settings.


This should now work correctly and when it sends mail it will have the forums domain name and also you have the inbox you can log into for return mail.

Its important at this point on this second way using your domain to be patient since your MX records will take up to 48 Hours to resolve before you may actually be able to send mail.The google control panel will verify if this has happened or not.Once the MX records have propegated on the net you should then be able to use the mail for the forums without any issues.Dont be tempted to keep changing settings it wont work you just need to wait on this part for them.You can tell from control panel google give you when it is resolved.

You get up to 50 free mails on the standard free package and the option to upgrade but for guild sites and small forums it is nice to use your own domain for mails.

I hope this is of help to some of you who have had problems setting up gmail on your forums. ;)







Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: vbgamer45 on October 19, 2009, 11:32:25 PM
Nice guide only bad really is the email limits like you said.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Iz-no-gud on October 20, 2009, 10:06:48 AM
Indeed, really good and thorough guide. I'm sure it will come handy to many users.
Thank you nightbre  ;)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: mirahalo on October 20, 2009, 10:31:47 AM
really nice tip and guide ;)  very useful.  thanks.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Liam. on October 20, 2009, 12:46:18 PM
I was looking for something like this! Although I don't use GMail myself and won't use it just for this; this has given me a GREAT start on my custom email mod... =] Thanks!
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: adam babe on October 26, 2009, 01:37:40 AM
Thanks for this great tips
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: humbleworld on October 26, 2009, 07:00:39 AM
If you have a big forum site that sends hundreds of notifications every your, google mail could pose a problem since there is a mail limit. I think it's 500 emails everyday?

Is there a way of avoiding this email sending limit? Then I won't hesitate to deploy the guide above.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Arantor on October 26, 2009, 07:39:39 AM
Quote from: humbleworld on October 26, 2009, 07:00:39 AM
Is there a way of avoiding this email sending limit? Then I won't hesitate to deploy the guide above.

Not really, unless you go for one of the bigger paid-for versions of Google's apps.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Garou on October 26, 2009, 11:55:46 AM
Ive been using Google apps for a while now and I highly recommend it. I wish you could mix the free and paid services on one account but its not possible at this time. There is a work around though, with domain names being so cheep through Go Daddy you can easily afford multiple URL's so get the dot com and net or whatever for your chosen URL.

Over on Google set up your main URL up with a paid account with one or 2 email addresses at $50 a pop per address, ouch. Then set up the secondary URL for the free service. This is the most cost effective way Ive found to use Google apps.

That said if you are paying for hosting your host should have some sort of mail server configured then you should be able to use the PHP default.

If you are running SMF off your own computer there are a few free and or cheep email servers you can install or you can usually set up an alternate email account through your ISP.

For myself I use the multiple Goggle apps accounts and a DNS provider separate from  my host. It makes it much easier to move hosts later on if you need to and its not that expensive in the long run. :)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: JohnMig on November 06, 2009, 05:14:35 AM
Thanks for providing this unique information. I have never created my Gmail id for this purpose. So, I am going to try this one for sure.

Thanks,
Globester.com
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: bugzy on November 09, 2009, 01:05:03 PM
Thanks for this! This is what I'm looking for  :)  (http://www.thesim.co.uk)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: sirNemanjapro on February 20, 2010, 11:28:05 PM
Could not connect to SMTP host: 0 :
2: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:587 (Unknown error)
File: /home/xxx/public_html/forum2/Sources/Subs-Post.php
Line: 973

2: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: Failed to enable crypto
File: /home/xxx/public_html/forum2/Sources/Subs-Post.php
Line: 973

2: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
File: /home/xxx/public_html/forum2/Sources/Subs-Post.php
Line: 973

Could not connect to SMTP host: 110 : Connection timed out
2: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:465 (Connection timed out)
File: /home/xxx/public_html/forum2/Sources/Subs-Post.php
Line: 973

Could not connect to SMTP host: 110 : Connection timed out
2: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:465 (Connection timed out)
File: /home/xxx/public_html/forum2/Sources/Subs-Post.php
Line: 973


It seams that whatever I do I cant get this to work. I am using 1.1.11, on a Apache 2.2 and MySQL 5.0.98. This is clean installation.

* xxx - deleted name of the account
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Night09 on February 21, 2010, 12:44:26 PM
Check your router and firewall that port 465 is open for google to use.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: sirNemanjapro on February 21, 2010, 11:14:24 PM
LOL... It's on a server, a real net server, not my home.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Arantor on February 22, 2010, 03:10:58 AM
Same advice applies. My real net server has a form of router as well as a firewall for both in and out-bound communications.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: sirNemanjapro on February 22, 2010, 03:52:46 AM
Solved. Changed SMTP/PHP and played with ssl setings..
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: willyboy on March 15, 2010, 02:25:05 PM
Quote from: sirNemanjapro on February 22, 2010, 03:52:46 AM
Solved. Changed SMTP/PHP and played with ssl setings..

hi, I have the same problem as you.
would you mind to tell us what are the steps you did to solve your problem.
I really appreciated.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: BEH on July 03, 2010, 06:45:43 AM
I am trying for configuring smtp server settings for sending automatic mails through smf upon registration, activation, new post etc. to users, but facing difficulties from last few days. Still not able to configure.

Details:
I am hosting my site on freehostia: Although they don't provide outgoing smtp for my free hosting plan, but still smtp: mbox.freehostia.com works perfectly for sending and receiving emails through microsoft outlook.

Firstly I tried:
Mail type        : SMTP
SMTP server       : mbox.freehostia.com (it works on outlook)
SMTP port       : 25 (same on outlook)
SMTP username  : [email protected]   
SMTP password  : emailpassword

It gives the error @ error log:
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to mbox.freehostia.com:25 (Permission denied)
Now I thought that my host server may not be allowing to send mail (as not allowed in my plan (but still I am able to do that through outlook)) So I configured google app for my website as explained by nightbre in this post.

After successfully configuration, I tried following on outlook and it worked
Incoming mail server (POP3): pop.gmail.com ; port: 995 ; ticked on: This server requires an encrypted connection (SSL)
Outgoing mail server (SMTP): smtp.gmail.com  ; port: 465 ; ticked on: This server requires an encrypted connection (SSL)

But when I am using this on smf server setting it is not working:
Trial:1
Mail type        : SMTP
SMTP server       : smtp.gmail.com
SMTP port       : 465
SMTP username  : [email protected]   
SMTP password  : emailpassword

Error:
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to smtp.gmail.com:465 (Permission denied)

Trial:2
Mail type        : SMTP
SMTP server       : ssl://smtp.gmail.com
SMTP port       : 465
SMTP username  : [email protected]   
SMTP password  : emailpassword

Error:
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:465 (Permission denied)

Trial:3
Mail type        : SMTP
SMTP server       : ssl://smtp.googlemail.com
SMTP port       : 465
SMTP username  : [email protected]   
SMTP password  : emailpassword

Error:
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.googlemail.com
:465 (Permission denied)

I am puzzled; Please help!!!
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: BEH on July 05, 2010, 07:48:10 AM
Dear board members, Please help!
No response for my smtp problem (see above post).
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Night09 on July 05, 2010, 09:41:45 AM
I am using  :ssl://smtp.googlemail.com and port :465

If you check with your host ssl is working ok on the server and also delete your cookies if you have changed the settings as it may interfere with the new settings after a change.

If your email and password are correct then trial 3 should be working imo so theres another reason stopping this work right for you.I have mine set up to access the admin account with google for ref in case you are trying a user account you have created.I dont think it matters but just to be clear how im using it too.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: lucas-ruroken on July 06, 2010, 06:25:40 PM
Nice tip ;)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: AZMazda3 on August 10, 2010, 02:04:52 PM
The single google email info worked for us for now. THanks!
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Ryan2320 on August 21, 2010, 05:13:02 PM
Thanks alot! This has help alot.. :)

Thanks again
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Soulgirl on September 05, 2010, 05:03:20 PM
Brilliant, you saved my day as I couldn't work it out.  Thank you! xxx
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: KensonPlays on September 06, 2010, 03:02:54 AM
Haven't set up on smf end, but use 3/50 stanard google apps email: my main, noreply, and my email for when clients email me.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: ben sisko on October 06, 2010, 06:14:05 AM
very useful guide. thx.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: DaBrute on December 27, 2010, 01:42:49 PM
this is still confusing
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF - Not for SMF 2.0 RC5 any more
Post by: Tomy Tran on March 24, 2011, 04:50:18 AM
This TIP is no more useful:

For forum I have setup with SMF 2.0 RC5, Google mail apps intergrated with my domain. It is successfully with mail send and receive via Microsoft Office Outlook 2007 but unsuccessfull with it on forum:

Action - Reset password:
http://forum.mysite.com/index.php?action=reminder;sa=picktype
2: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to smtp.gmail.com:465 (Connection timed out)
File: /home/toantm27/public_html/forum/Sources/Subs-Post.php
Line: 1343

See detail in line 1343:
1342:    // Try to connect to the SMTP server... if it doesn't exist, only wait three seconds.
==>1343:    if (!$socket = fsockopen($modSettings['smtp_host'], empty($modSettings['smtp_port']) ? 25 : $modSettings['smtp_port'], $errno, $errstr, 3))

Other error:
http://forum.mysite.net/index.php?action=reminder;sa=picktype
Unable to connect to Server via SMTP: 110 : Connection timed out

After see again in MS Outlook, I see it allow to try connecting to Server timeouts is 1 min (short is 10 sec), but in line 1343 of file /home/toantm27/public_html/forum/Sources/Subs-Post.php it allows only 3 secs. I dont know much but when I set it from 3 to 29 or 60 secs, it always say: Server error (and nothing recorded into Logs.

Any solution you have now? Share it please!

Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Garou on March 24, 2011, 03:43:27 PM
It still works that way on most servers however Ive come across a couple of hosts that are blocking mail services like that. For some reason they think its more secure if their mail server is used.  You end up having to use the php mail setting in SMF, which sends the mail from the hosts server.

The header information in the email will read  From: whatever address you set up in the mail settings of SMF then it will also say Mailed by: your hosts server.

If you have a text record set up with your DNS (highly recommended) you have to add the host to the record as well as Google, otherwise it will be considered as spam through most filters because the originating host isnt validated.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Hj Ahmad Rasyid Hj Ismail on April 22, 2011, 11:54:03 PM
Thanks for the tips. I like it.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: purnima on May 02, 2011, 05:24:17 AM
Before, I don't know this setting information. Thank you for sharing this guide.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: mastro on July 08, 2011, 02:38:57 PM
I was trying for a long time to configure google apps with smf. The solution for me was to change the Mail type from smtp to (PHP default). All the rest same as the guide ssl://smtp.gmail.com 465 etc..

Hope I've helped someone!!
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Garou on July 08, 2011, 05:10:24 PM
Quote from: Garou on March 24, 2011, 03:43:27 PM
Ive come across a couple of hosts that are blocking mail services like that. For some reason they think its more secure if their mail server is used.  You end up having to use the php mail setting in SMF, which sends the mail from the hosts server.

Essentially you are not using Gmail to send the mail, you are using your hosts PHP mail.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: coolcurrent on July 29, 2011, 01:48:53 PM
Quote from: BEH on July 03, 2010, 06:45:43 AM
I am trying for configuring smtp server settings for sending automatic mails through smf upon registration, activation, new post etc. to users, but facing difficulties from last few days. Still not able to configure.

Details:
I am hosting my site on freehostia: Although they don't provide outgoing smtp for my free hosting plan, but still smtp: mbox.freehostia.com works perfectly for sending and receiving emails through microsoft outlook.

Firstly I tried:
Mail type        : SMTP
SMTP server       : mbox.freehostia.com (it works on outlook)
SMTP port       : 25 (same on outlook)
SMTP username  : [email protected]   
SMTP password  : emailpassword

It gives the error @ error log:
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to mbox.freehostia.com:25 (Permission denied)
Now I thought that my host server may not be allowing to send mail (as not allowed in my plan (but still I am able to do that through outlook)) So I configured google app for my website as explained by nightbre in this post.

After successfully configuration, I tried following on outlook and it worked
Incoming mail server (POP3): pop.gmail.com ; port: 995 ; ticked on: This server requires an encrypted connection (SSL)
Outgoing mail server (SMTP): smtp.gmail.com  ; port: 465 ; ticked on: This server requires an encrypted connection (SSL)

But when I am using this on smf server setting it is not working:
Trial:1
Mail type        : SMTP
SMTP server       : smtp.gmail.com
SMTP port       : 465
SMTP username  : [email protected]   
SMTP password  : emailpassword

Error:
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to smtp.gmail.com:465 (Permission denied)

Trial:2
Mail type        : SMTP
SMTP server       : ssl://smtp.gmail.com
SMTP port       : 465
SMTP username  : [email protected]   
SMTP password  : emailpassword

Error:
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:465 (Permission denied)

Trial:3
Mail type        : SMTP
SMTP server       : ssl://smtp.googlemail.com
SMTP port       : 465
SMTP username  : [email protected]   
SMTP password  : emailpassword

Error:
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.googlemail.com
:465 (Permission denied)

I am puzzled; Please help!!!

If you are hosting on a free hots, then they must have blocked smtp
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Jasonsj10 on August 26, 2011, 04:46:56 PM
This tutorial is amazing. Thank you so much, I was having horrible issues with this spam. So now i got Email Verification and Questions :D
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: captaingeek on October 17, 2011, 11:25:52 AM
if the free gapps limit is 500 emails per day you can enable the mail q to send only 20 emails per hour correct?
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Jasonsj10 on October 23, 2011, 11:33:58 PM
Sadly i ruined my website and had to restart. I do not remember where to enable the "php_openssl" Could you help me out?
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: captaingeek on November 01, 2011, 11:25:14 AM
php.ini?
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Jasonsj10 on November 08, 2011, 03:00:50 PM
Tried that :( Didn't work.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: sambling on November 09, 2011, 07:53:08 PM
Won't that kill your gmail account? It did when I tried it on wordpress....
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: marcberm on February 01, 2012, 06:23:19 PM
I am getting similar connection timeout errors while trying to get this configured.  I know that my host has setup openSSL, as I submitted a ticket with them for that already and received notification it was complete.  Should my next step be to check that the host isn't blocking my ability to send SMTP mail via php?  Is there anything else I could/should check first?  I have attempted all of the variations (with and without the ssl://, as googlemail vs. gmail, username vs. full email address, etc).  I realize no one will probably have the magic answer here, but some logical progression of steps I can take to troubleshoot this would be helpful.  Thanks everyone, in advance!

Update:  I just checked with the provider, and they show a few tests where they have SMTP working on my server/domain.  They've suggested I check my code.  Kind of a newbie at this stuff.  I know just enough to be dangerous and sometimes enough to be productive in a slow and painful way. :)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Kevin1 on February 29, 2012, 05:32:22 AM
Same problem.

Could not connect to SMTP host: 110 : Connection timed out
smtp.gmail.com:465 (Connection timed out)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Night09 on February 29, 2012, 06:26:41 AM
SMTP server: ssl://smtp.gmail.com

SMTP port: 465

Sites running this config and sends ok.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Kevin1 on February 29, 2012, 01:49:44 PM
Quote from: nightbre on February 29, 2012, 06:26:41 AM
SMTP server: ssl://smtp.gmail.com

SMTP port: 465

Sites running this config and sends ok.
nothing happen. Problem exist
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Tomy Tran on March 06, 2012, 07:27:22 PM
I find out may be this problem:
GAPPs allow us sending 500 mails per day, means 20.8333 mails per hour, means 0.34722 mail per minute.

But go to Maintenance >> Mail >> Settings at this address:
http://forum.vnweb.org/index.php?action=admin;area=mailqueue;sa=settings

we have this option:
Maximum emails to send per minute, if we set to minimum is 1 (we cant set it to 0.34 or under 01), we will send a minimum 1*60*24 = 1440 mails per day. It's over the Limit of GAPPs 940 mails (= 1440 - 500).

Any one can code the SMF to allow we set Maximum emails to send per hour ?
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Night09 on March 07, 2012, 12:53:40 PM
The only thing i can suggest is break up your total and use the mail queue and send 500 per day from the queue. Not sure the best way of doing this but maybe someone can edit the template so instead of minutes change to max mails per hour or day. This may have been addressed in the mods or coding boards but you may need to have a good search.

The only other option is to sub to GAPP's for a higher quota.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Tomy Tran on March 09, 2012, 12:31:54 AM
For some limits of some host, it'd prefer to know how to change to Maximum emails to send per hour or to Maximum emails to send per day
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: stylusss on September 12, 2012, 06:44:28 PM
Thank you for this guide. :)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Aaruni on September 24, 2012, 07:51:54 AM
I still cant make it work :(
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Tyler Style on September 28, 2012, 02:57:05 PM
Unfortunately, I can't get this working either.  It's on a self-hosted Ubuntu box, using Apache2.  Openssl is enabled, and phpinfo reports it active, so that's not it.  I'm not seeing any error messages, either.  The Google Apps account is set up to accept POP.  Any troubleshooting tips?

Note: the screencap shows "(PHP default)" - it's not, it's SMTP.
(http://fora.steelplus.com/img/Selection_055.png)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Night09 on September 28, 2012, 03:44:45 PM
Check your router / firewall ect that the port is open and not blocked. You might have to open one to get it working.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Tyler Style on October 15, 2012, 02:42:57 PM
Quote from: nightbre on September 28, 2012, 03:44:45 PM
Check your router / firewall ect that the port is open and not blocked. You might have to open one to get it working.
It's in the DMZ, so that's not it.  Also, other apps are integrating with Google Apps just fine.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Night09 on October 15, 2012, 03:14:06 PM
Try changing     

ssl://smtp.googlemail.com   

to     

ssl://smtp.gmail.com
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Hj Ahmad Rasyid Hj Ismail on October 18, 2012, 02:12:14 AM
I can't get this working at all. I have edited my php.ini to enable openssl and try both instances of ssl://smtp.googlemail.com and ssl://smtp.gmail.com, with and without ssl, and all ports from 25, 465 and 587. I even try to increase the time from 3 seconds to 60 and 300 seconds but still failed. Is there anything else we need to do in our gmail settings other than enabling pop and disabling imap?
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Night09 on October 19, 2012, 08:16:44 AM
Have you set an alternative username and password in Admin settings for using ssl ? Mines on the default settings but wondering if anyone has changed this and maybe caused an issue using it as a secondary database user.

Also if you login to gmail is it set in settings (cog symbol) to use https ?
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Hj Ahmad Rasyid Hj Ismail on October 21, 2012, 01:17:00 AM
I did all of that. The only thing I didn't do is contacting my host. They do not allow it. That is why it doesn't work. So I was able to do it by setting up email under my domain with my host and use their smtp instead of gmail. I think that is even better since I can access it from my gmail, having responses forwarded to my gmail and set an autoresponder as well.
Title: Setting up a gmail account on SMF
Post by: Smythe on January 26, 2013, 12:33:54 PM
Looking for a little assistance...

This is the email error message that I get...

Could not connect to SMTP host: 10060 : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I have another forum set up using IP Boards with the same SMTP settings and it works just fine... the only difference is that IP Boards has an option to "Add '<' and '>' to 'to' and 'from' addresses"

not sure if thats the issue??? any suggestions ??? or way to add the "<" ">" to addresses to test..
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Aaruni on January 26, 2013, 12:42:03 PM
Quote from: Aaruni on September 24, 2012, 07:51:54 AM
I still cant make it work :(


Was dissalowed by host. Tried on localhost, and works without problems  :)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: crazyearner on February 20, 2013, 07:02:30 PM
Hello  I have followed guide and settings to get email set up so that system sends emails out if cliknig forgot password however does not send the emails out. Is their no built in email client with mf to send system messages out if not then I have tried and followed the setup process with gmail and still doe not send emails out.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Crozz on February 21, 2013, 03:15:39 AM
Quote from: crazyearner on February 20, 2013, 07:02:30 PM
Hello  I have followed guide and settings to get email set up so that system sends emails out if cliknig forgot password however does not send the emails out. Is their no built in email client with mf to send system messages out if not then I have tried and followed the setup process with gmail and still doe not send emails out.
SMF by default sends email through PHP, you must have set it to SMTP, also I think for gmail to work with domains you need to have
google apps account.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Night09 on February 21, 2013, 03:21:47 PM
Quote from: Crozz on February 21, 2013, 03:15:39 AM

Hello  I have followed guide and settings to get email set up so that system sends emails out if cliknig forgot password however does not send the emails out. Is their no built in email client with mf to send system messages out if not then I have tried and followed the setup process with gmail and still doe not send emails out.


You can use any google email both a single or a domain based one as long as the settings are inputted correctly. The guide shows both methods ive used in the past. Although SMF can use PHP to send mail I myself havent used this feature as my domains had their own urls to use.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: ApplianceJunk on July 13, 2014, 11:18:16 PM
For anyone having trouble with SMTP mail setting check to make sure your host does not have port 465 blocking outgoing connection.
Once my host lifted the block all worked well for me.

I also found this link helpful.
Send Email with Gmail - New Guide (http://www.simplemachines.org/community/index.php?topic=504772.0)
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: ApplianceJunk on July 14, 2014, 12:01:54 AM
I also found this tool helpful well setting up my domain email though gmail business apps.
https://toolbox.googleapps.com/apps/checkmx/
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Tomy Tran on September 03, 2014, 03:45:13 AM
Quote from: ApplianceJunk on July 14, 2014, 12:01:54 AM
I also found this tool helpful well setting up my domain email though gmail business apps.
https://toolbox.googleapps.com/apps/checkmx/
Very useful URL!
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Sudhakar Arjunan on May 13, 2016, 10:31:04 AM
Dear Team,

This setup was working fine till march 29, 2016. But suddenly am seeing all emails in queue for more than 18 days, 80 days etc. And only with 85 emails in queue about summary.

Did gmail settings for smtp is changed or something after march 2016.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Irisado on May 13, 2016, 10:55:46 AM
It may be related to this: http://www.simplemachines.org/community/index.php?topic=544856.0.  Have a read through that topic and see if it helps you :).
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Shambles on May 13, 2016, 11:44:42 AM
Quote from: Sudhakar Arjunan
This setup was working fine till march 29, 2016.

Yep, that's the day they tightened up the AUTH validator.

The link supplied by Irisado does contain a pointer to the fix.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: Sudhakar Arjunan on May 13, 2016, 12:48:26 PM
Quote from: Irisado on May 13, 2016, 10:55:46 AM
It may be related to this: http://www.simplemachines.org/community/index.php?topic=544856.0.  Have a read through that topic and see if it helps you :).

WoW i got the issue with gmail solved. Thanks Irisado.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: ross003 on April 28, 2017, 03:23:24 AM
I have a question: Is there a way of avoiding this email sending limit?

Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: sravan on September 06, 2019, 01:13:04 PM
@admins or mod : sorry for bumping the old topic. I feel below is the easiest way to fix this. I dont have rights to create topic.

Easiest way of fixing the email sending issue on smf.

create a gmail account.
come to smf email settings : Admin>maintenance>mail>settings
provide the details. attached screenshot. check that.

now come back to gmail and go to security settings.
- you should see Less Secure app access. (attached screenshot)
- turn it on.

voila done.

test it by registering a new account on your forums and you will receive the email.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: m4z on May 03, 2020, 01:47:03 PM
As recently mentioned here (https://www.simplemachines.org/community/index.php?topic=572774.msg4052439#msg4052439), sending mail from your SMF installation via GMail will probably stop working somewhere between 2020-06-15 and 2021-02-15, as "less secure apps" for G Suite are discontinued (https://9to5google.com/2019/12/17/g-suite-less-secure-apps/).

As I neither use GMail to send my forum mail (as described in this guide), nor use G Suite, I don't know if a) it's possible to use this guide with a "plain" GMail account (without G Suite), b) whether plain GMail is considered a "part" of G Suite, and in consequence, c) if the changes apply to these plain GMail accounts as well.
Title: Re: [TIP GUIDE] Setting up a gmail account on SMF
Post by: petewadey on August 21, 2020, 07:49:34 AM
Quote from: Night09 on October 19, 2009, 09:56:10 PM


If you run Apache server ensure php_openssl is enabled in your php extensions or you wont be able to send mail using ssl://



I've followed all the instructions, but how do I know if I'm using Apache to check the setting? Where do I look to find it?
Thanks