Unable to connect to Gmail

Got a gmail @ work account set to own domain name and have been trying…

Incoming Mail (IMAP) Server
imap.gmail.com

Requires SSL: Yes

Port: 993

Outgoing Mail (SMTP) Server
smtp.gmail.com

Requires SSL: Yes

Requires TLS: Yes (if available)

Requires Authentication: Yes

Port for SSL: 465

Port for TLS/STARTTLS: 587

But just return " Creating account failed: Mail server denied authentication." ?! Creating?

1 Like

Other imap accounts work, is it just google?

1 Like

One of two things come to mind:

  1. You’re using 2factor auth and need a one-time password
  2. You need to enable less secure apps to allow the mail app to connect via settings.

Well actually changed to my outlook.com email settings and the test send email worked not problem at all.

I can not get the mail app to load in this install, just tried it and not getting any logs to work with.
It just hangs and goes no further than the initial swirls of opening.

Its prob me guys and not that bothered as Mail is prob sorted and the gmail@work settings where not right as it would never send a test email as it just did.

I had been trying out another install back on ubuntu 16.04 running php7.0-fpm.

So many thanks with all the great responses, I have been messing with different memcache setups and various things in this install, so will go for another clean install and check the outlook.com then try gmail@work again.
Prob have to do some reading as its not a @gmail.com domain but uses gmail.

Cheers anyway and apols.

Likely because Outlook doesn’t ban you from using insecure apps like Outlook, Thunderbird, etc by default.

If you have a larger mailbox, it can take a while after adding the account - I left mine half an hour and came back to it later - it was then fine.

I know, I use it too. Enable less secure apps in settings and you should be able to authenticate.

No it was me Jason, eventually stopped swapping Distro’s and on Debian 8.6 64. NC 11.0

Also just as a trial not done any of the database or php config its all default php7.0
No # Header always set Strict-Transport-Security "max-age=15768000; preload" as you will see its remarked out.
No mem cache or redis either, I did have redis only as a distributed mem cache as it complained like hell but that was just another trial.

Connected straight away and the mail app is very much like the PDF viewer, excellent app, really good.
The initial sync took about 30 secs, the initial swirl to open inbox about 5 and the current message 10 secs max.

I know about security and file locking and all that but just going to how this goes, being noob I need to build up and see as most of my flood of posts is probably very myself.

Cheers though, at one point it will be Collaboro and I might be mentioning the C word once more.

The only thing it is doing is giving me a brief message of server error and not closing the send mail form.
But I receive the email! I will have a look at the logs.

Only thing that has got me confused is if you go into the mail settings you can only set an alias and it looks like I will have to add an account and then remove this one on any changes.

Hey Stuart, i was having similar troubles, as i use two step verification on my google account. The way that i got the nextcloud emailing feature to work was to make an app specific password for my nextcloud server by going to my google account settings and adding the application. Google then creates a password, which i used for the nextcloud server login (while keeping my typical username credentials the same). i hope this works for you too.

Can you delete google mails in the mail app? thats not working for me. it comes the message: “Error when deleting the message”

My main problems where a lack of Aufs in Debian 8 and the problem that brings with Collabora.
I haven’t really looked for a couple of days, but sort of need to have a look at 11.1 and see if the app developers have made any change.

I did notice that I seemed to be hitting problems when not working as Admin, but as Admin it worked.

One thing I didn’t do is try to delete an email, might be server side settings, but I did get Gmail working.
The only thing I found was prob due to my strange employment of technology but the center manager can not understand why he used to read documents in landscape mode anymore.
The 2K monitor in portrait displays the complete mail page on the screen and where ever you put the mouse, you can not get the mail app to grab the next page of emails and scroll down.

Also if you are sane and maybe just use a normal landscape monitor, it would be great if the mail app could buffer a page of emails, so it is one page in front.
To scroll down to the bottom of the emails and then grab the next page makes the mail app quite slow to use, but that is only a small quibble.

I will set-up another install here at home and see if I can replicate any problems, but actually apart from the Collabora/Aufs thing most of my problems where my own making.

Hi !
I installed Nextcloud 11 . I use https .
But I am not able to connect to gmail servers using the mail app.
I have tried setting "less secure apps. But I get “Creating account failed: Error connecting to mail server” error.
i used imap.gmail.com and smtp.gmail.com ports 993 and 465
Am I missing something ? I thought it was just like configuring a web mail client .
Any help will be appreciated !

Cheers

Rad

It is just like that but just took a bit of messing with port and ssl or tls.
Apols can not remember now but got the details from my account in settings.

https://support.google.com/mail/answer/7126229?hl=en&visit_id=1-636206483938871605-2222444695&rd=2

I have tried all . But still not able to connect. I am forced to give up.
Is there any other proven app ?

Works for me but found google problematic as they have various servers.
I tried another account first my outlook.com and it went straight away.

I think you will find you have the settings wrong but just try another email provider first to see.

I did anyway and it was also me at first.

NextCloud - eMail App with GMail

Here are the steps I documented to configure the NextCloud eMail app to work with GMail. I had similar issues on multiple GMail accounts, and these various scenarios helped me work through them. Hopefully they will help you.

If you get an error Error while creating the account: Gateway Timeout or others, try the following steps to successfully use GMail on NextCloud

Get GMail Ready

  1. Enable IMAP in the Gmail Settings](https://mail.google.com/mail/u/0/#settings/fwdandpop)

  2. Save Settings

  3. If you have 2-Step Verification enabled, create an App Password

  4. Otherwise, ensure Less secure apps is enabled

  5. Proceed to add account to NextCloud

Add the account to NextCloud

  1. In NextCloud Go to Mail
  2. At bottom of left pane, select Settings
  3. Select “Add mail account”
  4. Enter your information for the gmail account using the app password if you have 2-Step Verification enabled, or your normal GMail account password if not.
  5. Click “Connect”

Troubleshooting

If the NextCloud eMail app refuses to connect after preparing GMail for use, click on the Manual Configuration option prior to clicking on “Connect” when you add the eMail account.

Check your settings against Google’s SMTP & IMAP Settings to ensure they are correct.

REFERENCES

Enable less secure apps

Sign in using App Passwords

SMTP & IMAP Settings

App passwords

2 Likes

Unfortunately I still have problems connecting my GSuite company account.
First it worked and I could receive & send test mail.
But after a week Gmail is now blocking my Nextcloud mail client with error " Creating account failed: Mail server denied authentication."
I tried with my normal GSuite PW and created an App-PW as well. Both same error.
It’s not possible to enable “Unsecure Apps” setting.

Nextcloud 13.0.7.2
Nextcloud Mail App version 0.8.3

I know this reply is late, but I don’t usually check the forums very often. Because this is a corporate account, the GSuite administrator has the authority to make the IMAP option available to users or disable it. I believe the same is true regarding external application access and allowing less secure apps. If you’re administrator has locked down these features, it would be something you would need to request.

Hopefully this helps.

I have the same issue, impossible to connect to gmail.
I have less secure app enable, simple password, imap is open.
It should work, but it doesnt, someone is able to make it work with gmail or is it not possible ?
THX

This config works fine with my Gmail:

Le mar. 17 déc. 2019 à 12:05, Georgiy via Nextcloud community noreply@nextcloud.com a écrit :

I have this kind of setting and it doesn’t work (with the user and password of my gmail)

And I try another email with zacly, my server for nexcloud and It doesn’t work either