From fca8a23265413dadc384ce0239ce5bcd56a39201 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 17 Feb 2013 08:20:29 +0100 Subject: [PATCH] use enotify to send CC mails --- mod/item.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/mod/item.php b/mod/item.php index d04ab71dea..4fd4a23dc0 100644 --- a/mod/item.php +++ b/mod/item.php @@ -872,14 +872,20 @@ function item_post(&$a) { } else { $subject = email_header_encode('[Friendica]' . ' ' . sprintf( t('%s posted an update.'),$a->user['username']),'UTF-8'); } - $headers = 'From: ' . email_header_encode($a->user['username'],'UTF-8') . ' <' . $a->user['email'] . '>' . "\n"; - $headers .= 'MIME-Version: 1.0' . "\n"; - $headers .= 'Content-Type: text/html; charset=UTF-8' . "\n"; - $headers .= 'Content-Transfer-Encoding: 8bit' . "\n\n"; $link = '' . $a->user['username'] . '

'; $html = prepare_body($datarray); $message = '' . $link . $html . $disclaimer . ''; - @mail($addr, $subject, $message, $headers); + include_once('include/html2plain.php'); + $params = array ( + 'fromName' => $a->user['username'], + 'fromEmail' => $a->user['email'], + 'toEmail' => $addr, + 'replyTo' => $a->user['email'], + 'messageSubject' => $subject, + 'htmlVersion' => $message, + 'textVersion' => html2plain($html.$disclaimer), + ); + enotify::send($params); } } } -- 2.39.2