PHPMailer - как включить дебаг откладку

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2021
Перейти к:навигация, поиск

Доступная цена

PHPMailer - как включить дебаг откладку

$mail->SMTPDebug = 4; 
$mail->isSMTP();  // tell the class to use SMTP
$mail->SMTPAuth   = true;                /
$mail->Port       = 25;                 
$mail->Host       = "mail.yourhost.com"; 
$mail->Username   = "name@yourhost.com"; 
$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.

Комментарии

Индекс цитирования