smtp : allow the debug to be stored in a defined file

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2717 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-05-03 13:35:05 +00:00
parent 40d9a7ae4c
commit 38db9395be

View File

@@ -8,6 +8,9 @@ class smtp
{ {
/** Debug mode */ /** Debug mode */
public $debug = 0; public $debug = 0;
/** The debug file used to store all the communication between the client and
* the server. The file contains the passwords if used ! */
public $debugFile = "/tmp/debugSMTP";
/** The authentication user allow to send SMTP mails */ /** The authentication user allow to send SMTP mails */
public $user = null; public $user = null;
/** The authentication password allow to send SMTP mails */ /** The authentication password allow to send SMTP mails */
@@ -171,6 +174,6 @@ class smtp
return; return;
if ($priority > $this->debug) if ($priority > $this->debug)
return; return;
file_put_contents ("/tmp/debugsmtp", $message, FILE_APPEND); file_put_contents ($this->debugFile, $message, FILE_APPEND);
} }
} }