aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_mail.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-06-17 22:56:35 +0000
committerrub <rub@piwigo.org>2006-06-17 22:56:35 +0000
commit7457a64443e25650728bcbe47f4649e21c04f4e6 (patch)
tree1f2404f7bec5e2eea871f0161a9db1cb23d58294 /include/functions_mail.inc.php
parent006eecb3d663c6d37f370dc0402434fbc0422d7d (diff)
Issue ID 0000407: accents are not allowed in mail headers
git-svn-id: http://piwigo.org/svn/trunk@1361 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_mail.inc.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index 86ded9473..a209c6f04 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -78,13 +78,15 @@ function get_mail_configuration()
*/
function format_email($name, $email)
{
+ $cvt7b_name = str_translate_to_ascii7bits($name);
+
if (strpos($email, '<') === false)
{
- return $name.' <'.$email.'>';
+ return $cvt7b_name.' <'.$email.'>';
}
else
{
- return $name.$email;
+ return $cvt7b_name.$email;
}
}
@@ -95,6 +97,8 @@ function pwg_mail($to, $from = '', $subject = 'PhpWebGallery', $infos = '')
{
global $conf, $conf_mail;
+ $cvt7b_subject = str_translate_to_ascii7bits($subject);
+
if (!isset($conf_mail))
{
$conf_mail = get_mail_configuration();
@@ -126,11 +130,11 @@ function pwg_mail($to, $from = '', $subject = 'PhpWebGallery', $infos = '')
{
$options = '-f '.$from;
- return mail($to, $subject, $content, $headers, $options);
+ return mail($to, $cvt7b_subject, $content, $headers, $options);
}
else
{
- return mail($to, $subject, $content, $headers);
+ return mail($to, $cvt7b_subject, $content, $headers);
}
}