diff options
author | friendica <info@friendica.com> | 2012-01-31 20:03:46 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-01-31 20:03:46 -0800 |
commit | 86c0eac27d4ed2a454f752615a1b446cf2acd2b2 (patch) | |
tree | 85f35f137d3848881d17cda3fc7a8580bb0ad7bb /include/delivery.php | |
parent | 4fc455d195fef9f1bfbc9f125788650fb3153237 (diff) | |
download | volse-hubzilla-86c0eac27d4ed2a454f752615a1b446cf2acd2b2.tar.gz volse-hubzilla-86c0eac27d4ed2a454f752615a1b446cf2acd2b2.tar.bz2 volse-hubzilla-86c0eac27d4ed2a454f752615a1b446cf2acd2b2.zip |
transport for email contacts phase II
Diffstat (limited to 'include/delivery.php')
-rwxr-xr-x | include/delivery.php | 12 |
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"; |