aboutsummaryrefslogtreecommitdiffstats
path: root/include/delivery.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-01 19:23:45 -0800
committerfriendica <info@friendica.com>2012-02-01 19:23:45 -0800
commit94e396e6c4fda7a9113bfdb122fadfde0421e81c (patch)
tree2eb48e4a901751d0fc7e8bdf3f26564f34db6a3d /include/delivery.php
parent64d0616762efcff413a335f2fdde4d8219d44895 (diff)
parent840f69e2c8ba014b89314191859ad0b8b35631d5 (diff)
downloadvolse-hubzilla-94e396e6c4fda7a9113bfdb122fadfde0421e81c.tar.gz
volse-hubzilla-94e396e6c4fda7a9113bfdb122fadfde0421e81c.tar.bz2
volse-hubzilla-94e396e6c4fda7a9113bfdb122fadfde0421e81c.zip
Merge branch 'master' into spam
Diffstat (limited to 'include/delivery.php')
-rwxr-xr-xinclude/delivery.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/delivery.php b/include/delivery.php
index c05358868..71ce30023 100755
--- a/include/delivery.php
+++ b/include/delivery.php
@@ -373,7 +373,8 @@ function delivery_run($argv, $argc){
break;
case NETWORK_MAIL :
-
+ case NETWORK_MAIL2:
+
if(get_config('system','dfrn_only'))
break;
// WARNING: does not currently convert to RFC2047 header encodings, etc.
@@ -413,7 +414,14 @@ function delivery_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) && (! $contact['blocked']))
+ $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";
$headers .= 'Message-id: <' . $it['uri'] . '>' . "\n";