aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-08-10 22:14:17 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-08-10 22:14:17 -0700
commiteb6b2677cb214b018f95e621e3fcdce7e49c2d95 (patch)
treeae924a25336b0c01db31d0b0b9af3574df7c094f /mod
parent9662c44a17280781f2e0762c0bf0c53bec1ed5f2 (diff)
downloadvolse-hubzilla-eb6b2677cb214b018f95e621e3fcdce7e49c2d95.tar.gz
volse-hubzilla-eb6b2677cb214b018f95e621e3fcdce7e49c2d95.tar.bz2
volse-hubzilla-eb6b2677cb214b018f95e621e3fcdce7e49c2d95.zip
tracking mail notifications
Diffstat (limited to 'mod')
-rw-r--r--mod/dfrn_notify.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index 7b73344d6..057dfcb42 100644
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -68,6 +68,7 @@ function dfrn_notify_post(&$a) {
$msg['parent-uri'] = notags(unxmlify($base['in-reply-to'][0]['data']));
$msg['created'] = datetime_convert(notags(unxmlify('UTC','UTC',$base['sentdate'][0]['data'])));
+
$r = q("INSERT INTO `mail` (`" . implode("`, `", array_keys($msg))
. "`) VALUES ('" . implode("', '", array_values($msg)) . "')" );
@@ -76,7 +77,7 @@ function dfrn_notify_post(&$a) {
intval($importer['uid'])
);
require_once('bbcode.php');
- if((count($r)) && ($r[0]['notify_flags'] & NOTIFY_MAIL)) {
+ if((count($r)) && ($r[0]['notify-flags'] & NOTIFY_MAIL)) {
$tpl = file_get_contents('view/mail_received_eml.tpl');
$email_tpl = replace_macros($tpl, array(
'$sitename' => $a->config['sitename'],
@@ -88,16 +89,12 @@ function dfrn_notify_post(&$a) {
'$title' => $msg['title'],
'$body' => strip_tags(bbcode($msg['body']))
));
-
+
$res = mail($r[0]['email'], t("New mail received at ") . $a->config['sitename'],
- $email_tpl,t("From: Administrator@") . $_SERVER[SERVER_NAME] );
- if(!$res) {
- notice( t("Email notification failed.") . EOL );
- }
+ $email_tpl,t("From: Administrator@") . $a->get_hostname() );
}
-
xml_status(0);
- return;
+ return; // NOTREACHED
}
foreach($feed->get_items() as $item) {