Is Google App Password supported for sending from a gmail account?

Created on 8 May 2023, over 1 year ago

Problem/Motivation

Is google app password supported? https://support.google.com/mail/answer/185833?hl=en-GB

I ask because I can't seem to get this to work and can't see the debug statements (related: https://www.drupal.org/project/smtp/issues/3358960 🐛 smtp debug displays momentarily, too quick to see, needs to stay on screen Closed: duplicate )

I have setup my gmail with 2FA, and it says I can create app passwords for different clients to access.

I have done this successfully with zoho mail.

Steps to reproduce

setup app password
set up gmail smtp settings as described here: https://support.google.com/mail/answer/7126229

Proposed resolution

not known

Remaining tasks

to determine if this is supported

User interface changes

not known

API changes

not known

Data model changes

not known

💬 Support request
Status

Closed: works as designed

Version

1.2

Component

Code

Created by

🇬🇧United Kingdom therobyouknow

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @therobyouknow
  • 🇬🇧United Kingdom therobyouknow

    my setup:

    Drupal 10.0.9
    php 8.1.18
    Database Version 10.6.12-MariaDB-0ubuntu0.22.04.1

    in settings.php added:

    $config['smtp.settings']['smtp_server'] = 'smtp.gmail.com';
    $config['smtp.settings']['smtp_port'] = '587';
    $config['smtp.settings']['smtp_protocol'] = 'tls';
    $config['smtp.settings']['smtp_username'] = '<my-email-address-here>@gmail.org';
    $config['smtp.settings']['smtp_password'] = '<Google App Password here>';
    $config['smtp.settings']['smtp_from'] = $config['smtp.settings']['smtp_username'];
    $config['smtp.settings']['smtp_fromname'] = '<my-email-address-here>@gmail.org';

    The above approach as worked for Zoho mail, with Zoho app password.

  • 🇬🇧United Kingdom therobyouknow

    answer: yes.

    I had an error in my settings:

    $config['smtp.settings']['smtp_fromname'] = '@gmail.org';

    i.e. gmail.org - incorrect

    should be:

    $config['smtp.settings']['smtp_fromname'] = '@gmail.com';

    gmail.com

    closing issue.

  • Status changed to Closed: works as designed over 1 year ago
Production build 0.71.5 2024