Have a synology/portainer/docker/Nextcloud installation 6 (27.1.3)
I have a problem to setup Email server in Basic settings.
Always running into error message:
A problem occurred while sending the email. Please revise your settings. (Error: Email could not be sent. Check your mail server log)
Tried with gmail and yahoo address. Both accounts 2-factor authorized.
Meaning created passwords and use it in the credential part.
Found in the docs that setting
‘mail_smtpdebug’ => true,
in config/config.php would give some details about the problem.
Logged in and set the parameter.
Verified also the credentials in there entered via GUI.
But the GUI does not show anything at all.
Any advice how to proceed would be appreciated.
After digging in the docs found link:
So I set also
“log_type” => “file”,
“logfile” => “nextcloud.log”,
Then I got error messages in the GUI.
Next step is: I have to figure out the meaning
I’m having the same issue. I’ve done this a million times without error. I needed to recreate my nextcloud docker container and now I am mystified. I’m using a gmail account (tried non gmail and no go).
GMail needs to be enabled for remote clients in the Google account for security reason.
Please alo check, whether really SSL-encryption will be needed, or TLS is required.
The access of non-“certified” mail clients will be disabled by Google after several weeks or months and needs to be re-enabled manually in the Google account again.
I have no idea where to find that setting(s). Also, this didn’t work with a non-gmail account either.
Did not help. I’m not trying to setup an email client. I’ve been using nextcloud since version 12 and never had this problem, why this issue started I have no idea.
Nextcloud sends it’s emails the same way an email client does.
A likely issue might be your docker container is missing some CA’s or the container is seeing the wrong IP address and can’t verify the STARTTLS cert. Add this to your config and verify:
"mail_smtpstreamoptions" => array(
'ssl' => array(
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false
I’m not using a self-signed cert.
It’s not your cert it’s ignoring errors on but the email servers. Give it a try before dismissing, For whatever reason it’s possible for your nextcloud instance to be unable to verify the email server’s cert and so the TLS handshake fails. I’ve done this with a Microsoft exchange server in the past
Finally try to understand the call stack:
[core] Debug: Symfony\Component\Mailer\Exception\TransportException: Expected response code “250” but got code “550”, with message “550 Request failed; Mailbox unavailable”. at <>
- /var/www/html/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php line 182
Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->assertResponseCode(“550 Request fai … n”, )
- /var/www/html/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php line 235
Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->executeCommand(“MAIL FROM:\r\n”, )
- /var/www/html/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php line 199
- /var/www/html/3rdparty/symfony/mailer/Transport/AbstractTransport.php line 72
Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->doSend(["Symfony\Compo … "])
- /var/www/html/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php line 136
Symfony\Component\Mailer\Transport\AbstractTransport->send(["Symfony\Compo … "], ["Symfony\Compo … "])
- /var/www/html/3rdparty/symfony/mailer/Mailer.php line 45
- /var/www/html/lib/private/Mail/Mailer.php line 216
- /var/www/html/apps/settings/lib/Controller/MailSettingsController.php line 168
- /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
- /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController(["OCA\Settings\ … "], “sendTestMail”)
- /var/www/html/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Settings\ … "], “sendTestMail”)
- /var/www/html/lib/private/Route/Router.php line 315
OC\AppFramework\App::main(“OCA\Settings\ … r”, “sendTestMail”, ["OC\AppFramewo … "], [“settings.MailSettings.sendTestMail”])
- /var/www/html/lib/base.php line 1068
- /var/www/html/index.php line 36
from MyWAN-IP by MyUserName at 2023-11-29T10:14:47+00:00
What mailbox is not available?
Can somebody give me some advise?
550 Requested command failed because the user’s mailbox was unavailable, or the receiving server rejected the message because it was likely spam
Did you enter a valid Email Address for you Admin user under “Personal Settings” → “Email”?
I checked Personal Settings. In there I used the yahoo email address.
In the Basic Settings Email Server settings I used the gmail address.
This happened because I tested with 2 mail addresses. After changing to gmail and recreation of a new app password everything works now. Thanks for your help.