News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

GMail SMTP Fix

Started by tinoest, February 11, 2018, 11:18:43 AM

Previous topic - Next topic

tinoest

Link to Mod

Fixes SMF not being able to send Email's via GMail's SMTP servers, Less Secure app's has to be set to allow this Modification to work.

QuoteChange account access for less secure apps

To help keep Google Accounts through work, school, or other groups more secure, we block some less secure apps from using them. If you have this kind of account, you'll see a "Password incorrect" error when trying to sign in. If so, you have two options:

    Option 1: Install a more secure app that uses stronger security measures. All Google products, like Gmail, use the latest security measures.
    Option 2: Change your settings to allow less secure apps into your account. We don't recommend this option because it can make it easier for someone to break into your account. If you want to allow access anyway, follow these steps:
        Go to the "Less secure apps" section of my Account. https://myaccount.google.com/lesssecureapps
        Turn on Allow less secure apps. (Note: If your administrator has locked less secure app account access, this setting is hidden.)



Licence
Quote
Copyright © 2018 tinoest.  All rights reserved.

Developed by: tinoest
              https://tinoest.co.uk

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimers.
  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimers in the
     documentation and/or other materials provided with the distribution.
  3. Neither the names of tinoest, nor the names of its contributors may be
     used to endorse or promote products derived from this Software without
     specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
WITH THE SOFTWARE.

This license may be viewed online at http://opensource.org/licenses/BSD-3-Clause

-Rock Lee-

I'm just reviewing a community that serves and gives problems with the Gmail emails that it has been using for years. That's why it's great for me. I'm going to try it to see how anything you notice!


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

steve in houston

#2
I'd like to use Gmail as my main forum email but it's not working correctly.  It will send with mail type as PHP but not SMTP.  The email gives a phishing error when sent via PHP.

Here are the steps I took so far:
- Installed your mod
- Allowed less secure apps
- Server Settings->General - Updated email address to my gmail
- Maintenance->Mail->Settings
--- Changed mail type to SMTP
--- SMTP server = smtp.gmail.com
--- SMTP port = 465
--- SMTP username and password match my gmail account

What do you suggest?


EDIT
I think I got it.  I changed the SMTP to ssl://smtp.gmail.com (per another thread) and found that google sent a blocked access email so I allowed my IP.  I received an email without the error.

SomeoneElse

Is this still necessary? If I try on a 2.0.17 board, there's a big error message warning not to try installing it.

tinoest

It's no longer required with 2.0.17

MoonCat

I've been using GMAIL to send emails via SMTP. But today I've received a warning, that on May 30, they stop supporting less secure sign-in apps. I'd appreciate if someone came up with a solution how to continue using GMAIL after the changes.

Advertisement: