From 14530201b179c29500172a042ca2937f7992a17f Mon Sep 17 00:00:00 2001 From: Hannes Riebl <hannes.riebl@sub.uni-goettingen.de> Date: Thu, 31 Jan 2013 17:46:22 +0000 Subject: [PATCH] Only send relevant e-mails to list git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@13767 7c539038-3410-0410-b1ec-0f2a7bf1c452 --- .../include/tgImap.class.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/info.textgrid.middleware.tgauth.tgaccount/include/tgImap.class.php b/info.textgrid.middleware.tgauth.tgaccount/include/tgImap.class.php index a89b095..f904990 100644 --- a/info.textgrid.middleware.tgauth.tgaccount/include/tgImap.class.php +++ b/info.textgrid.middleware.tgauth.tgaccount/include/tgImap.class.php @@ -43,13 +43,18 @@ class tgImap { * mail($to, $subject, $body, $header); */ - $recipients = $to . ', ' . $this->bcc; + if (strpos($subject, 'Request Received') or strpos($subject, 'Anfrage eingegangen')) { + $recipients = $to; + } + else { + $recipients = $to . ', ' . $this->bcc; + $headers['Bcc'] = $this->bcc; + } - $headers['Bcc'] = $this->bcc; - $headers['From'] = $this->sender; - $headers['Reply-To'] = $this->reply; - $headers['Subject'] = $subject; - $headers['To'] = $to; + $headers['From'] = $this->sender; + $headers['Reply-To'] = $this->reply; + $headers['Subject'] = $subject; + $headers['To'] = $to; $body = wordwrap($body, 70); $text = $body; -- GitLab