if(strpos($localhost,':'))
$localhost = substr($localhost,0,strpos($localhost,':'));
if(strpos($localhost,':'))
$localhost = substr($localhost,0,strpos($localhost,':'));
'$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) ,
'$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) ,
'$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) ,
'$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) ,
'$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) ,
'$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) ,
continue;
if($item['id'] == $item_id) {
logger('notifier: followup: item: ' . print_r($item,true), LOGGER_DATA);
continue;
if($item['id'] == $item_id) {
logger('notifier: followup: item: ' . print_r($item,true), LOGGER_DATA);
- $slap = atom_entry($item,'html',$owner,$owner,false);
- $atom .= atom_entry($item,'text',$owner,$owner,false);
+ $slap = atom_entry($item,'html',null,$owner,false);
+ $atom .= atom_entry($item,'text',null,$owner,false);
// older sites without a corresponding dfrn_notify change may do the wrong thing.
if($item_id == $item['id'] || $item['id'] == $item['parent'])
// older sites without a corresponding dfrn_notify change may do the wrong thing.
if($item_id == $item['id'] || $item['id'] == $item['parent'])
- $atom .= atom_entry($item,'text',$contact,$owner,true);
+ $atom .= atom_entry($item,'text',null,$owner,true);
- $atom .= atom_entry($item,'text',$contact,$owner,true);
+ $atom .= atom_entry($item,'text',null,$owner,true);
- $slaps[] = atom_entry($item,'html',$contact,$owner,true);
+ $slaps[] = atom_entry($item,'html',null,$owner,true);
$subject = (($it['title']) ? email_header_encode($it['title'],'UTF-8') : t("\x28no subject\x29")) ;
// only expose our real email address to true friends
$subject = (($it['title']) ? email_header_encode($it['title'],'UTF-8') : t("\x28no subject\x29")) ;
// only expose our real email address to true friends
- $headers .= 'Message-id: <' . $it['uri'] . '>' . "\n";
+ // for testing purposes: Collect exported mails
+ //$file = tempnam("/tmp/friendica/", "mail-out2-");
+ //file_put_contents($file, json_encode($it));
+
+ $headers .= 'Message-Id: <' . iri2msgid($it['uri']) . '>' . "\n";
- dbesc($it['parent-uri'])
- );
- if(count($r)) {
- $subtitle = $r[0]['title'];
- if($subtitle) {
- if(strncasecmp($subtitle,'RE:',3))
- $subject = $subtitle;
- else
- $subject = 'Re: ' . $subtitle;
- }
- }
+ dbesc($it['parent-uri']));
+
+ if(count($r) AND ($r[0]['title'] != ''))
+ $subject = $r[0]['title'];
-
- $headers .= 'MIME-Version: 1.0' . "\n";
- $headers .= 'Content-Type: text/html; charset=UTF-8' . "\n";
- $headers .= 'Content-Transfer-Encoding: 8bit' . "\n\n";
- $html = prepare_body($it);
- $message = '<html><body>' . $html . '</body></html>';
- logger('notifier: email delivery to ' . $addr);
- mail($addr, $subject, $message, $headers);
+ email_send($addr, $subject, $headers, $it);
// we are the relay - send comments, likes and unlikes to our conversants
diaspora_send_relay($target_item,$owner,$contact);
break;
// we are the relay - send comments, likes and unlikes to our conversants
diaspora_send_relay($target_item,$owner,$contact);
break;
elseif(($top_level) && (! $walltowall)) {
// currently no workable solution for sending walltowall
diaspora_send_status($target_item,$owner,$contact);
elseif(($top_level) && (! $walltowall)) {
// currently no workable solution for sending walltowall
diaspora_send_status($target_item,$owner,$contact);