diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index 0f29003cf8e43c19ab07de5dbed63fa915fb10cf..2b11427f897a4cd98b93514f9cc0fb1def7fe76b 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -34,7 +34,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 class functions {
 	
 
-	public function mail($to, $subject, $text, $from, $filepath = '', $filetype = 'application/pdf', $filename = '') {
+	public function mail($to, $subject, $text, $from, $filepath = '', $filetype = 'application/pdf', $filename = '', $cc = '', $bcc = '') {
 		global $app,$conf;
 		
 		if($conf['demo_mode'] == true) $app->error("Mail sending disabled in demo mode.");
@@ -53,7 +53,9 @@ class functions {
 				unset($path_parts);
 			}
 
-			$header = "Return-Path: $form\nFrom: $from\nReply-To: $from\n";
+			$header = "Return-Path: $from\nFrom: $from\nReply-To: $from\n";
+			if($cc != '') $header .= "Cc: $cc\n";
+			if($bcc != '') $header .= "Bcc: $bcc\n";
 			$header .= "MIME-Version: 1.0\n";
 			$header .= "Content-Type: multipart/mixed; boundary=$uid\n";
 
@@ -74,6 +76,8 @@ class functions {
 			mail($to, $subject, "", $header);
 		} else {
 			$header = "From: $from\nReply-To: $from\n";
+			if($cc != '') $header .= "Cc: $cc\n";
+			if($bcc != '') $header .= "Bcc: $bcc\n";
 			$header .= "Content-Type: text/plain;\n\tcharset=\"UTF-8\"\n";
 			$header .= "Content-Transfer-Encoding: 8bit\n\n";
 			$subject      = "=?utf-8?B?".base64_encode($subject)."?=";