From bb7899060119334c8a6feb2eaa63f6276f2da306 Mon Sep 17 00:00:00 2001 From: rub Date: Wed, 14 Feb 2007 22:53:04 +0000 Subject: My last improvements before 1.7.0RC1. Can include Cc & Bcc on mail. Send mail to all administrators on new comment or new users. Add validate link on new comment mail. Try to detect if the NBM complementary content is HTML or plain text. With plain text, this content is convert to readable HTML. git-svn-id: http://piwigo.org/svn/trunk@1818 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/notification_by_mail.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'admin/notification_by_mail.php') diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php index 33e5f59dd..738623b19 100644 --- a/admin/notification_by_mail.php +++ b/admin/notification_by_mail.php @@ -226,11 +226,6 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l $is_action_send = ($action == 'send'); - if (!isset($customize_mail_content)) - { - $customize_mail_content = $conf['nbm_complementary_mail_content']; - } - // disabled and null mail_address are not selected in the list $data_users = get_user_notifications('send', $check_key_list); @@ -244,6 +239,18 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l { $datas = array(); + if (!isset($customize_mail_content)) + { + $customize_mail_content = $conf['nbm_complementary_mail_content']; + } + + if ($conf['nbm_send_html_mail'] and !(strpos($customize_mail_content, '<') === 0)) + { + // On HTML mail, detects if the content are HTML format. + // If it's plain text format, convert content to readable HTML + $customize_mail_content = nl2br(htmlentities($customize_mail_content)); + } + // Prepare message after change language if ($is_action_send) { -- cgit v1.2.3