]> git.mxchange.org Git - friendica.git/commitdiff
preparation for 3rd generation email contacts
authorfriendica <info@friendica.com>
Fri, 23 Dec 2011 09:38:06 +0000 (01:38 -0800)
committerfriendica <info@friendica.com>
Fri, 23 Dec 2011 09:38:06 +0000 (01:38 -0800)
include/notifier.php

index 2562f09eb05bb53f64187268a54d3ba1c72afe86..1db1b09daee560ea122dd71f2c4d7323f6238959 100644 (file)
@@ -626,7 +626,13 @@ function notifier_run($argv, $argc){
                                                        $reply_to = $r1[0]['reply_to'];
        
                                                $subject  = (($it['title']) ? $it['title'] : t("\x28no subject\x29")) ;
-                                               $headers  = 'From: ' . $local_user[0]['username'] . ' <' . $local_user[0]['email'] . '>' . "\n";
+
+                                               // only expose our real email address to true friends
+
+                                               if($contact['rel'] == CONTACT_IS_FRIEND)
+                                                       $headers  = 'From: ' . $local_user[0]['username'] . ' <' . $local_user[0]['email'] . '>' . "\n";
+                                               else
+                                                       $headers  = 'From: ' . $local_user[0]['username'] . ' <' . t('noreply') . '@' . $a->get_hostname() . '>' . "\n";
 
                                                if($reply_to)
                                                        $headers .= 'Reply-to: ' . $reply_to . "\n";