Email Test not work in basic setup (AIO Docker)

Hello! Could anyone help an old dog to learn a new trick?

I’m an old man hobbist who learned how to set up a cloud server for my family. I ALMOST get it done, but there is an error message on Admin Setup telling that I didn’t set up or test the email of the server. Ok… I place right configuration of SMTP, port, user and password, but the only thing that I get is a red banner with “The email could not be sent. Please review your settings. (Error: The email could not be sent. Check the email server log)”. There are no log errors about that.

I find no way to solve it, spent more than a week searching here in forum.

I am not a technician, just an old man enjoying some retirement time in keep the brain work. So, if it have solution, does anyone can explain in simple details how to solve it?

I am running Nextcloud AIO v7.11.2 on Ubuntu 22.04.

Thank you very much for any help!

Hi Cesar,

a few quesstions

  • is this config working on another client?
  • if not, is it a gmail smtp server?
  • if not, do you have access to the logfiles or a shell?
  • if not, any chance to install OCC Web ?
  • You’ve installed the Nextcloud AIO v7.11.2 docker?
    I hope we can fix this.

kind regards

1 Like

Hi, thank you for your kind answer!

Yes, this config is working on my Outlook at PC and mobile. It is my personal account on my domain. Also set up other email to profile, in order to enable Nextcloud send test. Its not Gmail.

Yes I have ssh access to the server, but I don’t figure out how to access the correct log files.

Yes, with some guidance, I can install anything (I learned from scratch how to set up a server and install nextcloud with all fixes, other than email issue)

I installed by myself the Nextcloud AIO with previous version, and update it today to v7.11.2 by AIO panel.

I hope you could help to fix it.

If you configure your Nextcloud mail, take care to use your Outlook-mail address as sender.
SMTP servers check outgoing email sender’s addesses against their own mail domain name.

IMAP server outlook.office365.com
IMAP port 993
IMAP encryption TLS
POP server name outlook.office365.com
POP port 995
POP encryption TLS
SMTP server name smtp-mail.outlook.com
SMTP port 587
SMTP encryption STARTTLS

Found here:

Thank you, but the email account I am using for NextCloud is not outlook.com but a cPanel email on my own domain.

My mention about Outlook refers to the client I use as asked above.

The issue is on NextCloud capabilities to send emails.

Hi,

you are welcome :slight_smile:

I don’t use the Nextcloud AIO v7.11.2 version. So some people might do this faster.

ok lets elevate the debug level.
Can you add or change this in your config.php

“log_type” => “file”,
“logfile” => “nextcloud.log”,
“loglevel” => 0,

image

than restart the container:
docker restart YOUR_INSTNANCE_ID

you get the ID executing docker ps

Example here: docker restart 6a6e1501c33b

make another mail test and execute straight after that:

sudo  grep --color failed  /var/log/nextcloud.log
sudo  grep --color mailtest  /var/log/nextcloud.log

:warning: Please remove all personal info first!

Then send this infos in a pastebin or here. As you like

Please let me know if you need more details.

1 Like

oops… This is all what I get now:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the webserver log.
<br />
<b>Parse error</b>:  syntax error, unexpected token &quot;=&gt;&quot;, expecting &quot;)&quot; in <b>/var/www/html/config/config.php</b> on line <b>65</b><br />

No worries… If needed, I can make the server again (I took a step by step note) and nothing really important there yet.

I just undone the changes and the server is back again…

I think I change the wrong config.php because there is a bunch of them on my server.

log_type and logfile are there already, I just added loglevel and boom… nextcloud crashed. After remove it back, nextcloud was up again

As I sad Nextcloud AIO is not my best side… :sweat_smile:

hidden

Please check:
/mnt/docker-aio-config/data/configuration.json

@sambilanet your link is incorrect.


@Cesar_Scavone Here is the official documentation:

1 Like

Take care on the syntax of the config.php.
If you add a line, it must end with a comma.

Does cPanel throw out any error log entry, after you tried to send a mail?

1 Like

Hi! No, it looks that there is no email structure on Nextcloud, just like to set email credentials on a thing that is not able emails.

Oh, that was useful! Now I know how to edit the config.php properly. Thank you!

1 Like

Nextcloud has no mailbox. So your cPanel mailserver must support an IMAP maibox, where Nextcloud mail can access to.

1 Like

Hello everyone!

With your help, I got the logs about email. Hope it can help you to understand what is happening with my email settings.

TransportException
Connection could not be established with host "ssl://smtp.webcenter.com.br:465": stream_socket_client(): Unable to connect to ssl://smtp.webcenter.com.br:465 (Operation timed out)
Sending mail to "Array ( [cesar@scavone.net.br] => Cesar Scavone ) " with subject "Teste da configuração de e-mail" failed

Any suggestion to make it work?

Thank you!

yes… my email is able to support IMAP and SMTP. I place a log error just above this message.

Thank you!

I think I got that log you asked. :slightly_smiling_face:

Obridado Cesar,

podiamos falar portugues, ne ? :slight_smile:
So sei um pouco…

Here even the smtp check for smtp.webcenter.com.br on https://mxtoolbox.com/ fails:

You migth check first what happens to smtp.webcenter.com.br ?
Is this the original smtp name following the manual from webcenter.com.br ?

kind regards

Podemos falar português sim! Mas para o bem do forum, vou seguir você e permanecer em inglês.

Cant figure out, becuase my Outlook that uses this same settings and is working fine.

Would you suggest another email provider that is passing in your tool?

Thank you! (valeu!)