Email configuration

I have a quick question and would appreciate your help with the answers. I want to configure emails at least for notifications for users in Nextcloud. I believe there’s an option under “Basic Settings” for this.

Do I really need an email transfer agent like Postfix to configure this?
For instance, if I want to configure an email within Nextcloud, do I need an existing email account?
I’m using Zoho Mail. Can I use email services from any provider for this?

Thanks for your help!

Yes. See here: Email — Nextcloud latest Administration Manual latest documentation

No.

I don’t know Zoho Mail, but according to their documentation it should be possible. See here: SMTP – Konfiguration des Simple Mail Transfer Protocol in Zoho Mail

1 Like

I tried but facing issue with smtp settings. Please find the screenshot attached

The password i created in zoho in particular app specific password. So i guess these config are right. What do you think?

PS: I did not install postfix or anyother mail transfer agent.

The settings look fine as far as I can tell. Unfortunately, the error message in Nextcloud’s webUI is quite generic, so it’s hard to say what exactly is causing the problem.

So here’s what I’d do…

Double check all the details, especially the app specific password for Zoho, maybe create a new one if in doubt.

If all the settings and the credentials are correct, it is also possible that your hosting provider, VPS provider or ISP where your Nextcloud is hosted is blocking port 465 outbound (this is the case with Hetzner for example). In this case you could try setting the encryption type to ‘None/STARTTLS’ and then use port 587 instead of 465.

If that doesn’t help either, try temporarily enabling debug mode in Nextcloud to get more detailed error messages: Email — Nextcloud latest Administration Manual latest documentation

Oh, and in some cases it might also be necessary to increase the timeout for the SMTP connection by adding the following to the config.php:

"mail_smtptimeout"  => 30,

See also here: Email — Nextcloud latest Administration Manual latest documentation

What I see is that you have entered a domain with .in… under outgoing server.
According to the Zoho documentation, the outgoing server must be smtp.zoho.com or smtppro.zoho.com.

You can read more in the Zoho documentation.

You entered something with smtppro.zoho.in(…) there.
I think that’s wrong and that might be the reason.

Edit:
In English its:
smtp.zoho.eu or smtppro.zoho.eu

I don’t know if a documentation in your language says .in? But you can try different ones.

2 Likes

It was not successful in either way. I want to contact zoho support and to check do they get triggered? Even i tried with gmail settings also i can’t be achieved. Thanks for your support guys.

No need to guess. Do as @bb77 already suggested to enable the mail feature’s logging to see what is going on:

If that doesn’t help either, try temporarily enabling debug mode in Nextcloud to get more detailed error messages: Email — Nextcloud latest Administration Manual latest documentation

Should i find the logging under personal settings?

The log can be found under Addministartaion → Logging, but first you need to change the log level to 0 in your config.php and add the line "mail_smtpdebug" => true, to see detailed messages about mail delivery, as described in the link to the documentation I provided.

Thanks and please find the debug logging report below:

Connection could not be established with host “ssl://smtppro.zoho.in:465”: stream_socket_client(): Unable to connect to ssl://smtppro.zoho.in:465 (Connection timed out)
Sending mail to "Array ( [info@drugvigil.com] => Balasubramanian Periannan ) " with subject “Email setting test” failed

And also please explain this error. How to resolve this?

It says that it can’t connect to the server. This might be because it doesn’t exist (*.in instead of *.eu like in the documentation) or that there might be some other network issue (e.g. a firewall)

Please verify that you’re using the correct server address based on your Zoho location. Perhaps there are different servers available for India.

  1. Firstly i did not install firewall yet
  2. Contacted zoho and they say every configuration i do is right, even they tried virtually. And my IP also not in the block list.

Since i am using thunderbird this same email with IMAP config. I am trying for 3 days to find a solution. Yes server i use from India.

Ok, if you can confirm that the config is working in another client, than it’s probably indeed related to some networking issue.

As we don’t know anything about your environment/installation of NC, we can’t help you much further here.

Connecting with

telent smtppro.zoho.in 465
Trying 103.103.197.104...
Connected to smtppro.zoho.in.
Escape character is '^]'.

works.
The message

might tell, that either SSL does not work with this port 465, try 587 instead or SSL is not activated at zoho.in, use TLS/none instead.
The last question is, do you have your account on zoho.in ??

Yes. I have account and mailing service is registered with zoho mails.

I am uncertain, that i do have any mistakes with configurations.
Find below my zoho server config settings:

And i am using this same email with thunderbird in a local machine.

Yes i am already using this email with thunderbird in my Linux machine.

What happens if you try to run the telnet command @Mornsgrans posted on your Nextcloud server?

I have received two different responses. When I connect from my local machine, I get a repeated response, but when I connect from the server, I don’t receive any response. Please find both screenshots below for reference.

Local machine:

local

Server:

server

So please check, whether outgoing port 465 is blocked on the server’s firewall.