From 44a405f74317c2e3ca74fade44f251209955d665 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 24 Jun 2006 17:17:35 +0000 Subject: [PATCH] Adding a $cleartos option to Mail::send() --- dev/changes.txt | 1 + mail.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dev/changes.txt b/dev/changes.txt index ac34191..33a7c81 100644 --- a/dev/changes.txt +++ b/dev/changes.txt @@ -4,6 +4,7 @@ - Added TYPE_BIN to create a macro in the API that will escape the string as binary, instead of a string - DB_MySQL can now properly escape binary - No longer populate API->values[] when calling API->fetch() [api.php] +- Added a parameter in Mail->send() to optionally clear the to list after sending [mail.php] 2.0.0 =============== diff --git a/mail.php b/mail.php index 3d95e74..f4f0ba7 100644 --- a/mail.php +++ b/mail.php @@ -248,9 +248,11 @@ class Mail * * @access public * + * @param bool Clear the "to" list after sending? + * * @return bool Status of the message */ - function send() + function send($cleartos = false) { // check the required stuff $this->registry->check_isso_fields(get_class($this)); @@ -356,6 +358,11 @@ class Mail $this->registry->debug("email: error sending to $address"); } } + + if ($cleartos) + { + $this->to = array(); + } } // ################################################################### -- 2.43.5