Advertisement:

Author Topic: [TIP GUIDE] Setting up a gmail account on SMF  (Read 132838 times)

Offline Night09

  • SMF Hero
  • ******
  • Posts: 1,940
  • Gender: Male
[TIP GUIDE] Setting up a gmail account on SMF
« 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 forums@gmail.com
2: You set up a domain with google apps so you have your own domain like forums@mydomain.com

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:     Youremailname@gmail.com
 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  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:                 Youremailname@yourdomain.com
 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. ;)







« Last Edit: September 19, 2014, 09:26:58 PM by Night09 »

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,348
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #1 on: October 19, 2009, 11:32:25 PM »
Nice guide only bad really is the email limits like you said.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Iz-no-gud

  • Semi-Newbie
  • *
  • Posts: 54
    • Bellydance
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #2 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  ;)
« Last Edit: October 20, 2009, 12:13:44 PM by Iz-no-gud »

Offline mirahalo

  • SMF Hero
  • ******
  • Posts: 7,692
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #3 on: October 20, 2009, 10:31:47 AM »
really nice tip and guide ;)  very useful.  thanks.

Offline Liam.

  • SMF Hero
  • ******
  • Posts: 2,240
  • Gender: Male
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #4 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!

Offline adam babe

  • Newbie
  • *
  • Posts: 3
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #5 on: October 26, 2009, 01:37:40 AM »
Thanks for this great tips

Offline humbleworld

  • Sr. Member
  • ****
  • Posts: 882
    • best article
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #6 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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,038
    • Arantor on GitHub
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #7 on: October 26, 2009, 07:39: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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Garou

  • Sr. Member
  • ****
  • Posts: 759
  • Gender: Male
  • On Hiatus.
    • Balance Games
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #8 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. :)

Offline JohnMig

  • Newbie
  • *
  • Posts: 1
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #9 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

Offline bugzy

  • Jr. Member
  • **
  • Posts: 210
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #10 on: November 09, 2009, 01:05:03 PM »
Thanks for this! This is what I'm looking for :)

Offline sirNemanjapro

  • Semi-Newbie
  • *
  • Posts: 76
  • Gender: Male
  • None of the above applies.
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #11 on: February 20, 2010, 11:28:05 PM »
Code: [Select]
Could not connect to SMTP host: 0 :
Code: [Select]
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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
Could not connect to SMTP host: 110 : Connection timed out
Code: [Select]
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
Code: [Select]
Could not connect to SMTP host: 110 : Connection timed out
Code: [Select]
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
None of the above applies.

Offline Night09

  • SMF Hero
  • ******
  • Posts: 1,940
  • Gender: Male
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #12 on: February 21, 2010, 12:44:26 PM »
Check your router and firewall that port 465 is open for google to use.

Offline sirNemanjapro

  • Semi-Newbie
  • *
  • Posts: 76
  • Gender: Male
  • None of the above applies.
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #13 on: February 21, 2010, 11:14:24 PM »
LOL... It's on a server, a real net server, not my home.
None of the above applies.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,038
    • Arantor on GitHub
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #14 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline sirNemanjapro

  • Semi-Newbie
  • *
  • Posts: 76
  • Gender: Male
  • None of the above applies.
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #15 on: February 22, 2010, 03:52:46 AM »
Solved. Changed SMTP/PHP and played with ssl setings..
None of the above applies.

Offline willyboy

  • Newbie
  • *
  • Posts: 3
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #16 on: March 15, 2010, 02:25:05 PM »
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.

Offline BEH

  • Newbie
  • *
  • Posts: 2
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #17 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  : mailadd@mysitename.com   
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  : mailadd@mysitename.com   
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  : mailadd@mysitename.com   
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  : mailadd@mysitename.com   
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!!!

Offline BEH

  • Newbie
  • *
  • Posts: 2
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #18 on: July 05, 2010, 07:48:10 AM »
Dear board members, Please help!
No response for my smtp problem (see above post).

Offline Night09

  • SMF Hero
  • ******
  • Posts: 1,940
  • Gender: Male
Re: [TIP GUIDE] Setting up a gmail account on SMF
« Reply #19 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.