Nextcloud version (eg, 20.0.5): Nextcloud Hub 6 (27.1.3)
Operating system and version (eg, Ubuntu 20.04): debian bookworm
Apache or nginx version (eg, Apache 2.4.25): turnkeylinux
PHP version (eg, 7.4): turnkeylinux
Is this the first time you’ve seen this error? (Y/N): Y
The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
[core] Debug: Symfony\Component\Mailer\Exception\TransportException: Connection could not be established with host "mail.smtp2go.com:25": stream_socket_client(): Unable to connect to mail.smtp2go.com:25 (Connection timed out) at <<closure>>
0. <<closure>>
Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream->Symfony\Component\Mailer\Transport\Smtp\Stream\{closure}("*** sensitive parameters replaced ***")
1. /var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/Stream/SocketStream.php line 157
stream_socket_client()
2. /var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php line 251
Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream->initialize()
3. /var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php line 194
Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->start()
4. /var/www/nextcloud/3rdparty/symfony/mailer/Transport/AbstractTransport.php line 72
Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->doSend()
5. /var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/SmtpTransport.php line 136
Symfony\Component\Mailer\Transport\AbstractTransport->send()
6. /var/www/nextcloud/3rdparty/symfony/mailer/Mailer.php line 45
Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->send()
7. /var/www/nextcloud/lib/private/Mail/Mailer.php line 216
Symfony\Component\Mailer\Mailer->send()
8. /var/www/nextcloud/apps/settings/lib/Controller/MailSettingsController.php line 168
OC\Mail\Mailer->send()
9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
OCA\Settings\Controller\MailSettingsController->sendTestMail()
10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController()
11. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch()
12. /var/www/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
13. /var/www/nextcloud/lib/base.php line 1068
OC\Route\Router->match()
14. /var/www/nextcloud/index.php line 36
OC::handleRequest()
POST /index.php/settings/admin/mailtest
from 192.168.1.192 by admin at 2023-11-06T20:58:38+00:00
This is on a VirtualBox machine with bridged network. Could that be the cause? It was able to download updates.
How do I test smtp connectivity from root terminal? Ping something? I think I also read someone saying it could be a timeout timelimit issue so I wonder if increasing that will help. I guess we’ll find out once I can test with a ping or whatever command you want me to try to run from terminal.
There are numerous ways to test. It’ll depend on what’s installed in your OS and/or what can be installed readily. Your favorite search engine is your friend.
Common examples of tools that let you test with arbitrary ports: telnet,nc, and ncat.
And, yes, there’s a timeout parameter on those docs I previously linked to.
P.S. You could also try alternative ports supported by smtp2go: