summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weber2011-08-01 22:54:31 +0000
committerChristian Weber2011-08-01 22:54:31 +0000
commit9ece647a8b97b3a901a250d785a473195b08135b (patch)
tree163535b1cfcab8313865ee64b37d4251a4beb0bc
parent88295b0101c1d83eb5c61f10262443986856d6b9 (diff)
downloaditools-9ece647a8b97b3a901a250d785a473195b08135b.tar.gz
itools-9ece647a8b97b3a901a250d785a473195b08135b.tar.bz2
itools-9ece647a8b97b3a901a250d785a473195b08135b.zip
use correct charset for headers, don't hardcode iso-8859-1
-rw-r--r--it_mail.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_mail.class b/it_mail.class
index b0e20c7..33105a3 100644
--- a/it_mail.class
+++ b/it_mail.class
@@ -309,7 +309,7 @@ function header_escape($string, $emailmode = false)
{
# Encode if not email address and contains special chars
$result .= !preg_match($emailpattern, $part) && preg_match('/[\x00-\x1f\x7f-\xff]/', $part)
- ? ("=?iso-8859-1?Q?" . str_replace(" ", "_", preg_replace('/[\x00-\x1f=\x7f-\xff]/e', "sprintf('=%02X', ord('\\0'))", $part)) . "?=")
+ ? ("=?{$this->charset}?Q?" . str_replace(" ", "_", preg_replace('/[\x00-\x1f=\x7f-\xff]/e', "sprintf('=%02X', ord('\\0'))", $part)) . "?=")
: $part;
}