From e3a7fc2f0c2c50ae4a27385f8031d154447f5ea4 Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Wed, 14 Jul 2021 17:52:22 +0200 Subject: [PATCH] Added CC parameter to sendSanchoMail function Signed-off-by: cris-technikum --- include/sancho.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/sancho.inc.php b/include/sancho.inc.php index b52a7fb28..5fc6fcdab 100644 --- a/include/sancho.inc.php +++ b/include/sancho.inc.php @@ -33,10 +33,12 @@ const DEFAULT_SANCHO_FOOTER_IMG = 'sancho_footer_DEFAULT.jpg'; * @param string $to Email-adress. * @param string $subject Subject of mail. * @param string $headerImg Filename of the specific Sancho header image. + * @param string $footerImg * @param string $replyTo default Email-adress for reply. + * @param string | array $cc * @return boolean True, if succeeded. */ -function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG, $footerImg = DEFAULT_SANCHO_FOOTER_IMG, $replyTo = '') +function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG, $footerImg = DEFAULT_SANCHO_FOOTER_IMG, $replyTo = '', $cc = '') { $from = 'sancho@'. DOMAIN; $sanchoHeader_img = dirname(__FILE__). '/../skin/images/sancho/'. $headerImg; @@ -69,6 +71,10 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm // * Set reply-to if (isset($replyTo) && $replyTo != '') $mail->setReplyTo($replyTo); + + // * Set cc + if (isset($cc) && $cc != '') + $mail->setCCRecievers($cc); // * embed the html content $mail->setHTMLContent($body);