diff options
author | rub <rub@piwigo.org> | 2007-10-12 22:14:23 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-10-12 22:14:23 +0000 |
commit | 608c174245ed8825366e40254e93bd57f777356d (patch) | |
tree | df0953bb7fa52b83be3c390b6ed19f5f8ebfdf44 | |
parent | 4afa14cc8d3f26f841c92b083355004251d75087 (diff) |
Replace htmlentities by htmlspecialchars on NBM in order to send a correct UTF8 mail.
Quote mail charset + add debug mail informations
Fix "check user with same mail" where null email was not discarded
git-svn-id: http://piwigo.org/svn/trunk@2136 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/notification_by_mail.php | 2 | ||||
-rw-r--r-- | include/functions_mail.inc.php | 3 | ||||
-rw-r--r-- | plugins/c13y_upgrade/initialize.inc.php | 1 | ||||
-rw-r--r-- | template/yoga/mail/text/html/header.tpl | 2 | ||||
-rw-r--r-- | template/yoga/mail/text/plain/header.tpl | 2 |
5 files changed, 7 insertions, 3 deletions
diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php index 377aed03e..ca59b3158 100644 --- a/admin/notification_by_mail.php +++ b/admin/notification_by_mail.php @@ -247,7 +247,7 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l { // 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)); + $customize_mail_content = nl2br(htmlspecialchars($customize_mail_content)); } // Prepare message after change language diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php index 9d69f474e..b4ad2c4e3 100644 --- a/include/functions_mail.inc.php +++ b/include/functions_mail.inc.php @@ -704,6 +704,9 @@ function pwg_mail($to, $args = array()) $filename .= '.html'; } $file = fopen($filename, 'w+'); + fwrite($file, $to); + fwrite($file, $cvt_subject); + fwrite($file, $headers); fwrite($file, $content); fclose($file); return true; diff --git a/plugins/c13y_upgrade/initialize.inc.php b/plugins/c13y_upgrade/initialize.inc.php index df53d01db..7cb3f7191 100644 --- a/plugins/c13y_upgrade/initialize.inc.php +++ b/plugins/c13y_upgrade/initialize.inc.php @@ -43,6 +43,7 @@ function c13y_upgrade($c13y_array) $query = '
select count(*)
from '.USERS_TABLE.'
+where '.$conf['user_fields']['email'].' is not null
group by upper('.$conf['user_fields']['email'].')
having count(*) > 1
limit 0,1
diff --git a/template/yoga/mail/text/html/header.tpl b/template/yoga/mail/text/html/header.tpl index 37df3bad9..716a498e6 100644 --- a/template/yoga/mail/text/html/header.tpl +++ b/template/yoga/mail/text/html/header.tpl @@ -1,5 +1,5 @@ -----={BOUNDARY_KEY} -Content-Type: {CONTENT_TYPE}; charset={CONTENT_ENCODING}; +Content-Type: {CONTENT_TYPE}; charset="{CONTENT_ENCODING}"; Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> diff --git a/template/yoga/mail/text/plain/header.tpl b/template/yoga/mail/text/plain/header.tpl index ce7667106..213fedbf1 100644 --- a/template/yoga/mail/text/plain/header.tpl +++ b/template/yoga/mail/text/plain/header.tpl @@ -1,3 +1,3 @@ -----={BOUNDARY_KEY} -Content-Type: {CONTENT_TYPE}; charset={CONTENT_ENCODING}; +Content-Type: {CONTENT_TYPE}; charset="{CONTENT_ENCODING}"; Content-Transfer-Encoding: 8bit |