Nextcloud gmail email account config

As per title, does anybody have an example of adding gmail to the nextcloud email app?

I’ve searched, but none of the exmples work for me. All latest versions.

TIA

Did you allow your gmail account to use the less secure protocols (“in its opinion”)?

https://www.google.com/settings/security/lesssecureapps

1 Like

There was a bug but fixed in mail app v0.11.0

1 Like

Thanks @saitobenkei, yes did all the recommendations/suggestions e.g. less secure apps and disable occasional capatcha, still no luck. (Authentication denied)

Thanks @dnutan, I am using all the latest. mail app is at v0.11.0

Maybe I need to move my quest to the nextcloud community.

What is the message? Could not reach server or wrong credentials?

That one

Perhaps you have to create an app-password at google and use this.

https://myaccount.google.com/apppasswords

Tip is from here:

1 Like

That looks promising. Will try later today.

1 Like

Too bad, following the link I get a Google notification on screen:

The setting you are looking for is not available for your account.

I’ve done a test, hope it helps.

  1. Login to your Gmail account

  2. Go to Settings -> Forwarding and POP/IMAP: Enable IMAP, and Save settings

    • gmail-forwarding-enable-imap
  3. If you use 2-Step-Verification, generate and app password:
    3.1. Select the app and device you want to generate the app password for:

    • Select app: Other (Custom name): Nextcloud Mail app
    • click Generate button
      Sample App Password:
      gmail-generated-app-password
      gmail-app-password-created
  4. On Nextcloud, open Mail app and add mail account providing your credentials: Name, Mail Address, (app) Password.
    If autoconfiguration fails, try with Manual configuration (see Use IMAP to check Gmail on other email clients). Example:

    • Name: Your name
    • Mail Address: example@gmail.com
    • IMAP Host: imap.gmail.com
    • IMAP Port: 993, IMAP Security: SSL/TLS
    • IMAP User: example@gmail.com
    • IMAP Password: (app) password
    • SMTP Host: smtp.gmail.com
    • SMTP Port: 465, SMTP Security: SSL/TLS
    • SMTP User: example@gmail.com
    • SMTP Password: (app) password

Notes: I’ve tested with an account using 2-Step-Verification and generated the 16- character App Password, without spaces. No further troubleshooting steps were required.

Troubleshooting:

  • Temporarily enable debug and increase loglevel (nextcloud’s config.php file) and monitor nextcloud.log file:
  'debug' => true,
  'loglevel' => 0,

furhter logging can be obtained (horde_imap.log, horde_smtp.log) adding:

'app.mail.imaplog.enabled' => true,
'app.mail.smtplog.enabled' => true,
  • SMTP Security: I’ve read STARTTLS can fail with nextcloud app
  • If log reports timeout errors you can add some app settings to nextcloud’s config.php file:
  'app.mail.imap.timeout' => 30,
  'app.mail.smtp.timeout' => 30,
5 Likes

Overwelming! Thanks @dnutan!

I’ll give that a go some time my tomorrow.

Many thanks!

@dnutan, this did the trick for me! Again, thanks for your time and effort, and I hope it will help others.

-HF