Note_for_SMTP_debugging.txt 1.1 KB

1234567891011121314151617181920212223
  1. If you are having problems connecting or sending emails through your SMTP server, please note:
  2. 1. The new rewrite of class.smtp.php provides more information about the processing/errors taking place
  3. 2. Use the debug functionality of class.smtp.php. To do that, in your own script add the debug level you wish to use. An example of that is:
  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. Notes on this:
  12. $mail->SMTPDebug = 0; ... will disable debugging (you can also leave this out completely, 0 is the default
  13. $mail->SMTPDebug = 1; ... will echo errors and messages
  14. $mail->SMTPDebug = 2; ... will echo messages only
  15. ... and finally, the options are 0, 1, and 2 ... any number greater than 2 will be interpreted as 2
  16. And finally, don't forget to disable debugging before going into production.
  17. Enjoy!
  18. Andy