aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-15 15:28:32 -0800
committerfriendica <info@friendica.com>2012-02-15 15:28:32 -0800
commitd05442610158eb21cd3e9b9b3cd8cd3e5d56c13c (patch)
tree3f5c295ceb5f488394becb28458ff27c2e6df24a /include
parentc965074e5343bf97a8d077e1dc00384f36f90acc (diff)
downloadvolse-hubzilla-d05442610158eb21cd3e9b9b3cd8cd3e5d56c13c.tar.gz
volse-hubzilla-d05442610158eb21cd3e9b9b3cd8cd3e5d56c13c.tar.bz2
volse-hubzilla-d05442610158eb21cd3e9b9b3cd8cd3e5d56c13c.zip
encode email headers on message deliveries
Diffstat (limited to 'include')
-rwxr-xr-xinclude/delivery.php7
-rwxr-xr-xinclude/notifier.php8
2 files changed, 8 insertions, 7 deletions
diff --git a/include/delivery.php b/include/delivery.php
index 71ce30023..03199b010 100755
--- a/include/delivery.php
+++ b/include/delivery.php
@@ -21,6 +21,7 @@ function delivery_run($argv, $argc){
require_once('include/items.php');
require_once('include/bbcode.php');
require_once('include/diaspora.php');
+ require_once('include/email.php');
load_config('config');
load_config('system');
@@ -413,14 +414,14 @@ function delivery_run($argv, $argc){
if($r1 && $r1[0]['reply_to'])
$reply_to = $r1[0]['reply_to'];
- $subject = (($it['title']) ? $it['title'] : t("\x28no subject\x29")) ;
+ $subject = (($it['title']) ? email_header_encode($it['title'],'UTF-8') : t("\x28no subject\x29")) ;
// only expose our real email address to true friends
if(($contact['rel'] == CONTACT_IS_FRIEND) && (! $contact['blocked']))
- $headers = 'From: ' . $local_user[0]['username'] . ' <' . $local_user[0]['email'] . '>' . "\n";
+ $headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . $local_user[0]['email'] . '>' . "\n";
else
- $headers = 'From: ' . $local_user[0]['username'] . ' <' . t('noreply') . '@' . $a->get_hostname() . '>' . "\n";
+ $headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . t('noreply') . '@' . $a->get_hostname() . '>' . "\n";
if($reply_to)
$headers .= 'Reply-to: ' . $reply_to . "\n";
diff --git a/include/notifier.php b/include/notifier.php
index 53178ce53..70fd1d52c 100755
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -35,7 +35,7 @@ function notifier_run($argv, $argc){
require_once("datetime.php");
require_once('include/items.php');
require_once('include/bbcode.php');
-
+ require_once('include/email.php');
load_config('config');
load_config('system');
@@ -626,14 +626,14 @@ function notifier_run($argv, $argc){
if($r1 && $r1[0]['reply_to'])
$reply_to = $r1[0]['reply_to'];
- $subject = (($it['title']) ? $it['title'] : t("\x28no subject\x29")) ;
+ $subject = (($it['title']) ? email_header_encode($it['title'],'UTF-8') : t("\x28no subject\x29")) ;
// only expose our real email address to true friends
if(($contact['rel'] == CONTACT_IS_FRIEND) && (! $contact['blocked']))
- $headers = 'From: ' . $local_user[0]['username'] . ' <' . $local_user[0]['email'] . '>' . "\n";
+ $headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . $local_user[0]['email'] . '>' . "\n";
else
- $headers = 'From: ' . $local_user[0]['username'] . ' <' . t('noreply') . '@' . $a->get_hostname() . '>' . "\n";
+ $headers = 'From: ' . email_header_encode($local_user[0]['username'],'UTF-8') . ' <' . t('noreply') . '@' . $a->get_hostname() . '>' . "\n";
if($reply_to)
$headers .= 'Reply-to: ' . $reply_to . "\n";