Просмотр файла main_files/phpmailer/docs/Note_for_SMTP_debugging.txt

Размер файла: 1.03Kb
  1. If you are having problems connecting or sending emails through your SMTP server, the SMTP class can provide more information about the processing/errors taking place.
  2. Use the debug functionality of the class to see what's going on in your connections. To do that, set the debug level in your script. For example:
  3.  
  4. $mail->SMTPDebug = 1;
  5. $mail->isSMTP(); // telling the class to use SMTP
  6. $mail->SMTPAuth = true; // enable SMTP authentication
  7. $mail->Port = 26; // set the SMTP port
  8. $mail->Host = "mail.yourhost.com"; // SMTP server
  9. $mail->Username = "name@yourhost.com"; // SMTP account username
  10. $mail->Password = "your password"; // SMTP account password
  11.  
  12. Notes on this:
  13. $mail->SMTPDebug = 0; ... will disable debugging (you can also leave this out completely, 0 is the default)
  14. $mail->SMTPDebug = 1; ... will echo errors and server responses
  15. $mail->SMTPDebug = 2; ... will echo errors, server responses and client messages
  16.  
  17. And finally, don't forget to disable debugging before going into production.