PHPMailer - как включить дебаг откладку
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Версия от 19:00, 21 сентября 2021; Admin iph (обсуждение | вклад) (Новая страница: «=== PHPMailer - как включить дебаг откладку === $mail->SMTPDebug = 2; $mail->isSMTP(); // tell the class to use SMTP $mail->SMTPAu...»)
PHPMailer - как включить дебаг откладку
$mail->SMTPDebug = 2; $mail->isSMTP(); // tell the class to use SMTP $mail->SMTPAuth = true; / $mail->Port = 25; $mail->Host = "mail.yourhost.com"; $mail->Username = "[email protected]"; $mail->Password = "your password";
Уровние откладки PHPMailer - от 1 до 4:
SMTP::DEBUG_OFF (0): Disable debugging (you can also leave this out completely, 0 is the default). SMTP::DEBUG_CLIENT (1): Output messages sent by the client. SMTP::DEBUG_SERVER (2): as 1, plus responses received from the server (this is the most useful setting). SMTP::DEBUG_CONNECTION (3): as 2, plus more information about the initial connection - this level can help diagnose STARTTLS failures. SMTP::DEBUG_LOWLEVEL (4): as 3, plus even lower-level information, very verbose, don't use for debugging SMTP, only low-level problems.