The issue
I have set up the mail configuration through the management panel as follows:
Addresses: noreply@forum.databorder.cn
Choose a Driver: smtp
SMTP Settings:
Host: smtp.qiye.aliyun.com
Port: 465
Encryption: empty
Username: robert@baustem.com
Password: *****
And I have also configured the config.php file with the following settings:
config.php:
return [
'debug' => false,
'database' => [
// database settings here...
],
'url' => 'https://forum.databorder.cn',
'paths' => [
// paths settings here...
],
'headers' => [
// headers settings here...
],
'allow_sign_up' => true,
'mail' => [
'driver' => 'smtp',
'host'=> "smtp.qiye.aliyun.com",
"port"=>465,
"from" =>
array(
"address"=>"robert@baustem.com",
"name"=>"robert"
),
"username"=>"robert@baustem.com",
"password"=>"*************"
]
];
After running php flarum cache:clear
, I tried to send a test email using the Send Test Mail button in the management panel, which should send an email to my address at robert@baustem.com. However, it gave me an error message saying:
Oops! Something went wrong. Please reload the page and try again.
Post some information here like what you expected to see, but got instead. If you can find any logs in /storage/logs
or in your browser console that relate to the issue, add them.
Next Swift_TransportException: Connection to smtp.qiye.aliyun.com:465 Timed Out in /home/haibing/flarum/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:475
Stack trace:
#0 /home/haibing/flarum/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(360): Swift_Transport_AbstractSmtpTransport->getFullResponse()
#1 /home/haibing/flarum/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(147): Swift_Transport_AbstractSmtpTransport->readGreeting()
#2 /home/haibing/flarum/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(65): Swift_Transport_AbstractSmtpTransport->start()
#3 /home/haibing/flarum/vendor/illuminate/mail/Mailer.php(521): Swift_Mailer->send()
#4 /home/haibing/flarum/vendor/illuminate/mail/Mailer.php(288): Illuminate\Mail\Mailer->sendSwiftMessage()
#5 /home/haibing/flarum/vendor/illuminate/mail/Mailer.php(212): Illuminate\Mail\Mailer->send()
#6 /home/haibing/flarum/vendor/flarum/core/src/Api/Controller/SendTestMailController.php(43): Illuminate\Mail\Mailer->raw()
#7 /home/haibing/flarum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\SendTestMailController->handle()
#8 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http{closure}()
#9 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process()
#10 /home/haibing/flarum/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#11 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\ThrottleApi->process()
#12 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle()
#13 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CheckCsrfToken->process()
#14 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle()
#15 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process()
#16 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#17 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process()
#18 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle()
#19 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#20 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#21 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithSession->process()
#22 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#23 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\RememberFromCookie->process()
#24 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#25 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\StartSession->process()
#26 /home/haibing/flarum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#27 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\FakeHttpMethods->process()
#28 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#29 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ParseJsonBody->process()
#30 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#31 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process()
#32 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#33 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\InjectActorReference->process()
#34 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#35 /home/haibing/flarum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#36 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\RequestHandler->process()
#37 /home/haibing/flarum/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#38 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePathRouter->process()
#39 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#40 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Laminas\Stratigility\Middleware\OriginalMessages->process()
#41 /home/haibing/flarum/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#42 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePath->process()
#43 /home/haibing/flarum/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#44 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ProcessIp->process()
#45 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#46 /home/haibing/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process()
#47 /home/haibing/flarum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#48 /home/haibing/flarum/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#49 /home/haibing/flarum/public/index.php(26): Flarum\Http\Server->listen()
#50 {main}
Flarum information
Flarum core: 1.8.1
PHP version: 7.4.33
MySQL version: 5.7.42-0ubuntu0.18.04.1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, Zend OPcache
+----------------------+---------+--------+
| Flarum Extensions | | |
+----------------------+---------+--------+
| ID | Version | Commit |
+----------------------+---------+--------+
| flarum-flags | v1.8.0 | |
| flarum-approval | v1.8.0 | |
| flarum-tags | v1.8.0 | |
| flarum-suspend | v1.8.0 | |
| flarum-subscriptions | v1.8.0 | |
| flarum-sticky | v1.8.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-mentions | v1.8.0 | |
| flarum-markdown | v1.8.0 | |
| flarum-lock | v1.8.0 | |
| flarum-likes | v1.8.0 | |
| flarum-lang-english | v1.8.0 | |
| flarum-emoji | v1.8.0 | |
| flarum-bbcode | v1.8.0 | |
+----------------------+---------+--------+
Base URL: https://forum.databorder.cn
Installation path: /home/haibing/flarum
Queue driver: sync
Session driver: file
Mail driver: smtp
Debug mode: off
Post your output of php flarum info here. Without this information providing support will take longer!