Page 1 of 1

Settings for SMPT with Gmail

Posted: Thu Mar 09, 2017 5:49 pm
by Vasile Borza
I worked three days to understand the necessary settings for SMTP email sent via the gmail account. I use phpBB 3.2.0, Fedora 25 and MariaDB, php 7.02. There is a known bug that I reported: the button "Send a test email" is not working.
Finally settings that everything is okay, are these:

Contact email address: username@gmail.com
Return email address: username@gmail.com
Use SMTP server for email: Yes
SMTP server address: smtp.gmail.com (without ssl: !!)
SMTP server port: 587
Authentication method for SMTP: LOGIN
SMTP username: username@gmail.com
SMTP password: password
For me any other settings like 465 port or ssl://smtp.gmail.com, or tsl://.. or PLAIN , or any combination is not working.

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 7:37 am
by Explode!
I found this thread while looking up the best configuration to use a Gmail account for email delivery and thought I'd add an update to the OP.

phpBB 3.2.2
php 7.0.3
Ubuntu 16.04.1

I used all of the settings mentioned in my configuration and emails would not work. I found that Gmail have introduced a security setting to prevent less secure access, which this is classed as.

To get things working you need to log in to the Gmail account you're using and from this page: https://myaccount.google.com/security change "Allow less secure apps" to ON.

If like me your email account is managed through G-Suite then you'll first have to allow the user to do this from the Admin Centre Security Settings. "Allow users to manage their access to less secure apps".

Once I'd done this the "Send test email" was delivered to my board admin account and new registration emails were successfully received.

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 7:52 am
by Mick
If you continue having mail issues try using the PHP mail() function (SMTP off) and don’t use “free” email addresses but use an email address supplied by your host admin@mydomain.com for example.

Is there any specific reason you want to use SMTP?

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 8:02 am
by Explode!
Hi Mick, thanks for the reply, the mail is working fine through SMTP. I was just reporting back what I did to get it working :)

I am not using an @freedomain.com - I'm nowusing SMTP because regardless of my SPF settings mail delivery directly out of the server hosting the board to new or existing members has always been sketchy.

Using the authenticated login it will be sent from the account itself hence the delivery should be more reliable.

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 8:14 am
by Mick
No worries it’s good you have it working👍🏼

I had an SMTP set up that had been sketchy for a long time, some emails it sent others it didn’t including the test mail. Changing to non SMTP and using a domain email miraculously made it all work.

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 3:11 pm
by Lumpy Burgertushie
gmail is a free email

the point is to use a email at your host like you@yourdomain.com

many hosts do not allow relaying email through their server from any other server much less something like gmail or hotmail or other free email providers.
it is always best to use a email address at the domain you are on.


robert

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 3:45 pm
by Explode!
Hi Robert,

You're not right there, Gmail can be used for business through G-Suite which allows you to use your own @yourdomain.com as I mentioned earlier in the thread and this is how I'm configured.

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 3:54 pm
by Lumpy Burgertushie
gmail can be used for anything but it remains that it is a free email provider.

I don't understand what the other part means. if you are using your gmail address for the smtp in your board then you are not using the smtp server at your host nor are you using the built in php mail of your host.

uncheck smtp, don't use gmail at all. create ( if you haven't already ) a board email account on your host and use that for the board email in the settings area of the admin panel.

test, see what happens. remember none of this has anything to do with gmail for the test.


robert

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 4:18 pm
by Mick
Lumpy Burgertushie wrote:
Wed Jun 13, 2018 3:11 pm
it is always best to use a email address at the domain you are on
After several years reading you say this and my recent similar issues I have to say I think you’re correct. My sketchy email set up suddenly burst in to life after I started using my domain email address. I’m not saying why this is, I don’t know but it’s worked on two boards with email issues in the last three days.

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 4:59 pm
by Explode!
Robert, G-Suite isn't free, it's a service from Google to host your own domain there for emails much like Office365 from Microsoft. It has nothing to do with free Gmail accounts.

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 7:27 pm
by Lumpy Burgertushie
Explode! wrote:
Wed Jun 13, 2018 4:59 pm
Robert, G-Suite isn't free, it's a service from Google to host your own domain there for emails much like Office365 from Microsoft. It has nothing to do with free Gmail accounts.
ok, why not try what we are suggesting to see what happens. shouldn't take more than a couple of minutes and then you will know.
besides, if you already have a email address at yourdomain for the board why are you using gmail to begin with? you can simply create a forward for your board email to your gmail etc.


robert

Re: Settings for SMPT with Gmail

Posted: Wed Jun 13, 2018 7:29 pm
by Explode!
I don't have any problems, what do I need to try?

My settings are great.

Re: Settings for SMPT with Gmail

Posted: Tue May 21, 2019 8:20 am
by STN
Vasile Borza wrote:
Thu Mar 09, 2017 5:49 pm
I worked three days to understand the necessary settings for SMTP email sent via the gmail account. I use phpBB 3.2.0, Fedora 25 and MariaDB, php 7.02. There is a known bug that I reported: the button "Send a test email" is not working.
Finally settings that everything is okay, are these:

Contact email address: username@gmail.com
Return email address: username@gmail.com
Use SMTP server for email: Yes
SMTP server address: smtp.gmail.com (without ssl: !!)
SMTP server port: 587
Authentication method for SMTP: LOGIN
SMTP username: username@gmail.com
SMTP password: password
For me any other settings like 465 port or ssl://smtp.gmail.com, or tsl://.. or PLAIN , or any combination is not working.
Thank you! This worked like a charm.

I have been trying for past couple of hours to make smtp work with Gsuite to no avail until changing the port from 465 to 587