The same configs on my two flarum sites.
Site A:
Flarum
1.4.1PHP
8.1.22MySQL
5.7.43-cll-lve
Site B
Flarum
1.7.0PHP
8.0.30MySQL
5.7.43
Site A sends test mail successfully, Site B shows the following error.
Here is the error messages:
[2023-09-02 03:01:51] flarum.ERROR: Swift_TransportException: Connection could not be established with host smtp.gmail.com :stream_socket_client(): Unable to connect to ssl://smtp.gmail.com:465 (Network is unreachable) in /home/hrjh/public_html/flarum/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:261
Stack trace:
#0 [internal function]: Swift_Transport_StreamBuffer->{closure}(2, 'stream_socket_c...', '/home/hrjh/publ...', 264)
#1 /home/hrjh/public_html/flarum/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(264): stream_socket_client('ssl://smtp.gmai...', 0, '', 30, 4, Resource id #1057)
#2 /home/hrjh/public_html/flarum/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(58): Swift_Transport_StreamBuffer->establishSocketConnection()
#3 /home/hrjh/public_html/flarum/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(143): Swift_Transport_StreamBuffer->initialize(Array)
#4 /home/hrjh/public_html/flarum/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(65): Swift_Transport_AbstractSmtpTransport->start()
#5 /home/hrjh/public_html/flarum/vendor/illuminate/mail/Mailer.php(521): Swift_Mailer->send(Object(Swift_Message), Array)
#6 /home/hrjh/public_html/flarum/vendor/illuminate/mail/Mailer.php(288): Illuminate\Mail\Mailer->sendSwiftMessage(Object(Swift_Message))
#7 /home/hrjh/public_html/flarum/vendor/illuminate/mail/Mailer.php(200): Illuminate\Mail\Mailer->send(Object(Illuminate\Support\HtmlString), Array, Object(Closure))
#8 /home/hrjh/public_html/flarum/vendor/fof/pretty-mail/src/Mailer.php(77): Illuminate\Mail\Mailer->html('<html>\n<head>\n ...', Object(Closure))
#9 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Api/Controller/SendTestMailController.php(43): FoF\PrettyMail\Mailer->raw('HRJH\xEF\xBC\x8C\xE6\x81\xAD\xE5\x96\x9C\xE6\x82...', Object(Closure))
#10 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\SendTestMailController->handle(Object(Laminas\Diactoros\ServerRequest))
#11 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http{closure}(Object(Laminas\Diactoros\ServerRequest), Array)
#12 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Closure))
#13 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#14 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\ThrottleApi->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#15 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#16 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#17 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#18 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#19 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#20 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#21 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#22 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#23 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#24 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#25 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#26 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\RememberFromCookie->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#27 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#28 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\StartSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#29 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#30 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#31 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#32 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ParseJsonBody->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#33 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#34 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#35 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#36 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\InjectActorReference->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#37 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#38 /home/hrjh/public_html/flarum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#39 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\RequestHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#40 /home/hrjh/public_html/flarum/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#41 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePathRouter->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#42 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#43 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Laminas\Stratigility\Middleware\OriginalMessages->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#44 /home/hrjh/public_html/flarum/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#45 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePath->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#46 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#47 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ProcessIp->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#48 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#49 /home/hrjh/public_html/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\EmptyPipelineHandler))
#50 /home/hrjh/public_html/flarum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(73): Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))
#51 /home/hrjh/public_html/flarum/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#52 /home/hrjh/public_html/flarum/public/index.php(26): Flarum\Http\Server->listen()
#53 {main}
Flarum information
Here is my flarum info
[hrjh@lnx915 flarum]$ php flarum info
Flarum core: 1.7.0
PHP version: 8.0.29
MySQL version: 5.7.42
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, readline, Reflection, SPL, session, standard, bcmath, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, iconv, imap, exif, mysqlnd, PDO, Phar, posix, SimpleXML, sockets, sqlite3, tokenizer, xml, xmlwriter, xsl, zip, mysqli, pdo_mysql, pdo_sqlite, xmlreader
+------------------------------------+---------+--------+
| Flarum Extensions | | |
+------------------------------------+---------+--------+
| ID | Version | Commit |
+------------------------------------+---------+--------+
| flarum-flags | v1.7.0 | |
| flarum-approval | v1.7.0 | |
| flarum-subscriptions | v1.7.0 | |
| flarum-tags | v1.7.1 | |
| flarum-suspend | v1.7.0 | |
| flarum-bbcode | v1.7.0 | |
| fof-upload | 1.2.3 | |
| flarum-sticky | v1.7.0 | |
| fof-formatting | 1.0.3 | |
| fof-follow-tags | 1.1.7 | |
| flamarkt-backoffice | 0.1.3 | |
| fof-byobu | 1.3.0 | |
| flarum-likes | v1.7.0 | |
| fof-merge-discussions | 1.3.1 | |
| afrux-forum-widgets-core | v0.1.7 | |
| zerosonesfun-member | 1.2 | |
| zerosonesfun-featured-card | 1.0.3 | |
| zerosonesfun-collection | 1.2 | |
| zerosonesfun-bbcode-space | 1.0 | |
| zerosonesfun-bbcode-iframe | 1.0 | |
| zerosonesfun-bbcode-button | 1.1.3 | |
| zerosonesfun-bbcode-audio | 3.1.3 | |
| zerosonesfun-bbcode-advanced-image | 0.3 | |
| zequeen-acgembed-remastered | v1.1.2 | |
| v17development-user-badges | v1.1.0 | |
| v17development-seo | v1.8.0 | |
| the-turk-stickiest | 2.0.3 | |
| the-turk-quiet-edits | 0.1.3 | |
| the-turk-nodp | 1.0.1 | |
| the-turk-flamoji | 1.0.4 | |
| sycho-lite-youtube | v0.1.1 | |
| sycho-discussion-canonical-url | 0.1.1 | |
| ramesh-dada-bbcode-alerts | 6.21 | |
| nearata-related-discussions | 1.4.0 | |
| nearata-internal-links-noreload | v2.1.3 | |
| nearata-copy-code-to-clipboard | v2.1.0 | |
| katosdev-signature | 1.2 | |
| justoverclock-hashtag | 1.0.1 | |
| justoverclock-guestengagement | 1.0.3 | |
| itnt-uitab | v0.4.2 | |
| imshuzai-right-and-center-bbcode | 1.0.0 | |
| imshuzai-phonetic-bbcode | 1.0.0 | |
| ianm-synopsis | 1.3.0 | |
| ianm-no-meta-title | 1.1.0 | |
| ianm-follow-users | 1.3.0 | |
| fof-split | 1.1.0 | |
| fof-socialprofile | 1.1.5 | |
| fof-sitemap | 1.0.3 | |
| fof-profile-image-crop | 1.1.1 | |
| fof-pretty-mail | 1.1.1 | |
| fof-polls | 1.4.1 | |
| fof-pages | 1.0.5 | |
| fof-oauth | 1.3.2 | |
| fof-masquerade | 1.0.0 | |
| fof-links | 1.1.4 | |
| fof-linguist | 1.1.1 | |
| fof-impersonate | 1.1.1 | |
| fof-ignore-users | 1.2.0 | |
| fof-html-errors | 1.1.1 | |
| fof-geoip | 1.1.0 | |
| fof-drafts | 1.2.2 | |
| fof-discussion-thumbnail | 1.1.2 | |
| fof-best-answer | 1.2.5 | |
| fof-bbcode-tabs | 1.0.3 | |
| fof-bbcode-details | 1.1.1 | |
| fof-ban-ips | 1.0.3 | |
| fof-analytics | 1.1.0 | |
| flarumtr-mobile-search | v1.2 | |
| flarumite-simple-spoilers | 1.0.0 | |
| flarumite-simple-discussion-views | 1.1.6 | |
| flarum-statistics | v1.7.0 | |
| flarum-nicknames | v1.7.0 | |
| flarum-mentions | v1.7.0 | |
| flarum-markdown | v1.7.0 | |
| flarum-lock | v1.7.0 | |
| flarum-lang-english | v1.7.0 | |
| flarum-lang-chinese-simplified | v1.3.0 | |
| flarum-emoji | v1.7.0 | |
| ecnu-im-sticky-sidenav | v1.1.0 | |
| davwheat-share | v1.1.0 | |
| davwheat-session-keepalive | 1.1.0 | |
| davwheat-ads | 1.2.0 | |
| datlechin-scroll-buttons | v1.1.0 | |
| darkle-fancybox | 0.2 | |
| clarkwinkelmann-status | 1.0.0 | |
| clarkwinkelmann-post-bookmarks | 1.0.0 | |
| clarkwinkelmann-likes-received | 1.0.2 | |
| clarkwinkelmann-discussion-lists | 1.0.0 | |
| clarkwinkelmann-author-change | 1.0.3 | |
| blomstra-turnstile | 0.1.2 | |
| blomstra-flag-duplicates | 0.1.8 | |
| aurorum-better-iframe | v2.0.2 | |
| askvortsov-markdown-tables | v1.2.1 | |
| askvortsov-help-tags | v1.1.0 | |
| askvortsov-discussion-templates | v0.8.3 | |
| antoinefr-bbcode-fa | v1.0.0 | |
| afrux-online-users-widget | v0.1.6 | |
| afrux-news-widget | v0.1.1 | |
| acpl-my-tags | 1.2.1 | |
+------------------------------------+---------+--------+
Base URL: https://www.hrjh.org
Queue driver: sync
Session driver: file
Scheduler status: core.admin.dashboard.status.scheduler.never-run
Mail driver: smtp
Debug mode: off