Pokud nefunguje výchozí konfigurace e-mailů, lze v Nameless nastavit Gmail nebo SMTP.
Abyste tak učinili, jděte do Panel -> Konfigurace -> E-maily
a povolte možnost Povolit PHPMailer?
. Pole pod danou možností je potřeba vyplnit podle návodu níže.
smtp.seznam.cz
465
core/email.php
nastavte hodnotu secure
na ssl
smtp.gmail.com
587
Poznámka pro Gmail účty: pokud nemáte povolené 2FA, budete muset každých pár dní odemknout Captcha. Tomu se dá zamezit povolením 2FA a vygenerováním hesla aplikace.
smtp-mail.outlook.com
587
core/email.php
nastavte hodnotu secure
na starttls
V souboru core/email.php
se nacházejí další pole, včetně portu SMTP serveru, ty ale vyžadují manuální nastavení.
Přejmenujte core/classes/Email.php
(NE core/email.php
) na něco jiného (např. Email.php.original
). Vytvořte nový soubor Email.php
s tímto obsahem.
NamelessMC nyní vypíše podrobnou informaci o ladění při odeslání e-mailu. Pozor, tato informace může obsahovat citlivá data.
Pro návrat zpět smažte soubor Email.php
a přejmenujte Email.php.original
zpět na Email.php
.
Pokud to daný server nevyžaduje, nepoužívejte port 465. Většina webových serverů by měla povolit připojování na port 587, který byste měli raději použít. Hodnota secure
v souboru core/email.php
by měla být nastavena na tls
.
Tento port je zastaralý, jak je popsáno v RFC 8314:
Historically, port 465 was briefly registered as the "smtps" port. This registration made no sense, as the SMTP transport MX infrastructure has no way to specify a port, so port 25 is always used. As a result, the registration was revoked and was subsequently reassigned to a different service. In hindsight, the "smtps" registration should have been renamed or reserved rather than revoked. Unfortunately, some widely deployed mail software interpreted "smtps" as "submissions" [RFC6409] and used that port for email submission by default when an end user requested security during account setup. If a new port is assigned for the submissions service, either (a) email software will continue with unregistered use of port 465 (leaving the port registry inaccurate relative to de facto practice and wasting a well-known port) or (b) confusion between the de facto and registered ports will cause harmful interoperability problems that will deter the use of TLS for Message Submission. The authors of this document believe that both of these outcomes are less desirable than a "wart" in the registry documenting real-world usage of a port for two purposes. Although STARTTLS on port 587 has been deployed, it has not replaced the deployed use of Implicit TLS submission on port 465.
Překlad