diff options
author | rub <rub@piwigo.org> | 2007-02-14 22:53:04 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-02-14 22:53:04 +0000 |
commit | bb7899060119334c8a6feb2eaa63f6276f2da306 (patch) | |
tree | 94b0106214554f4a38ba86a2fbb167de09d5cc92 /admin/notification_by_mail.php | |
parent | aabdb3e9295474760b2d3fd5d76d2c235970fe16 (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | admin/notification_by_mail.php | 17 |
1 files changed, 12 insertions, 5 deletions
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) { |