[details=“Support intro”]
Hi there – I’m running Nextcloud 29.0.12. My instance of Nextcloud is not successfully sending test emails.
I have tested with two different known-good mail servers and configurations and have just not had any luck. I’d welcome any assistance.
Everything else seems to be running happily.
The Basics
- Nextcloud Server version (e.g., 29.x.x):
29.0.12 (Docker), and 30.0.6 (Docker)
- Operating system and version (e.g., Ubuntu 24.04):
Ubuntu 24.04.1
- Web server and version (e.g, Apache 2.4.25):
Whatever's in the docker container
- Reverse proxy and version _(e.g. nginx 1.27.2)
nginx proxy manager
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
No
Steps to replicate it (hint: details matter!):
- Configure config.php (see relevant settings below)
- Log into Nextcloud as admin.
- Verify that there’s an email address specified for the admin user by checking Personal Settings → Personal Info → Email.
- Go to Administration Settings → Basic Settings - Email Server
- Configure server settings
- Click “Send Email”.
- Speak expletive of choice.
Log entries
{"reqId":"LP9xrWR43DFUecH03fnN","level":0,"time":"2025-03-08T01:33:36+00:00","remoteAddr":"10.123.45.01","user":"admin","app":"no app in context","method":"POST","url":"/settings/admin/mailtest","message":"Email transport \"Symfony\\Component\\Mailer\\Transport\\Smtp\\SmtpTransport\" starting","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36","version":"29.0.12.2","data":[]}>
{"reqId":"LP9xrWR43DFUecH03fnN","level":0,"time":"2025-03-08T01:33:36+00:00","remoteAddr":"10.123.45.01","user":"admin","app":"core","method":"POST","url":"/settings/admin/mailtest","message":"Sending mail to \"Array\n(\n [admin@mycompany.com] => admin\n)\n\" with subject \"Email setting test\" failed"}}
{"reqId":"LP9xrWR43DFUecH03fnN","level":0,"time":"2025-03-08T01:33:36+00:00","remoteAddr":"10.123.45.01","user":"admin","app":"core","method":"POST","url":"/settings/admin/mailtest","message":"","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36","version":"29.0.12.2","data":{"app":"core"}}
Configuration
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '[REDACTED]',
'password' => '[REDACTED]',
'port' => 6379,
),
'trusted_proxies' =>
array (
0 => '172.24.0.0/16',
1 => '10.0.0.0/8',
2 => '127.0.0.1',
),
'mail_smtpmode' => 'smtp',
'mail_smtphost' => 'smtp.mywebhost.com',
'mail_smtpport' => '25',
'mail_smtpauthtype' => 'LOGIN',
'mail_from_address' => 'NoReply',
'mail_domain' => 'mycompany.com',
'mail_sendmailmode' => 'smtp',
'mail_smtptimeout' => 30,
'mail_smtpauth' => true,
'mail_smtpname' => 'testuser@mycompany.com',
'mail_smtppassword' => '[REDACTED]',
'passwordsalt' => '[REDACTED]',
'secret' => '[REDACTED]',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '127.0.0.1',
2 => '10.123.45.67:8004',
3 => 'myserver.mycompany.com',
),
'default_locale' => 'en_US',
'default_language' => 'en',
'default_phone_region' => 'US',
'auth.webauthn.enabled' => false,
'maintenance_window_start' => 1,
'remember_login_cookie_lifetime' => 0,
'session_lifetime' => 14400,
'session_keepalive' => true,
'session_relaxed_expiry' => false,
'auto_logout' => true,
'allow_user_to_change_display_name' => false,
'datadirectory' => '/var/www/html/data',
'tempdirectory' => '/tmp',
'dbtype' => 'mysql',
'dbname' => '[REDACTED]',
'dbhost' => '[REDACTED]:[REDACTED]',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => '[REDACTED]',
'installed' => true,
'instanceid' => '[REDACTED]',
'maintenance' => false,
'loglevel' => 0,
'mail_smtpdebug' => 'true',
'theme' => '',
'version' => '29.0.12.2',
'overwritehost' => 'myserver.mycompany.com',
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://myserver.mycompany.com',
'trashbin_retention_obligation' => 'auto, 30',
'mail_smtpsecure' => 'tls',
);