aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_notify.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-16 14:41:12 -0800
committerFriendika <info@friendika.com>2011-02-16 14:41:12 -0800
commit9f1f9da89bb98d768b7a41b388e9c5c0d28ec946 (patch)
treea17db499ecfbf5f81139c69f9405feb88fa34f63 /mod/dfrn_notify.php
parentd6998ffef2277eefc6a48c2371cc3c6077102bf5 (diff)
parent5aa6bbbbc5a32541c5b9176762aeccf573ba2601 (diff)
downloadvolse-hubzilla-9f1f9da89bb98d768b7a41b388e9c5c0d28ec946.tar.gz
volse-hubzilla-9f1f9da89bb98d768b7a41b388e9c5c0d28ec946.tar.bz2
volse-hubzilla-9f1f9da89bb98d768b7a41b388e9c5c0d28ec946.zip
Merge branch 'chriscase-master'
Diffstat (limited to 'mod/dfrn_notify.php')
-rw-r--r--mod/dfrn_notify.php34
1 files changed, 30 insertions, 4 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index 5f91f1b1b..040263b0c 100644
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -210,10 +210,23 @@ function dfrn_notify_post(&$a) {
= html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r","\\n\\n" ,"\\n"), "<br />\n",$msg['body']))));
// load the template for private message notifications
- $tpl = load_view_file('view/mail_received_eml.tpl');
+ $tpl = load_view_file('view/mail_received_html_body_eml.tpl');
+ $email_html_body_tpl = replace_macros($tpl,array(
+ '$siteName' => $a->config['sitename'], // name of this site
+ '$siteurl' => $a->get_baseurl(), // descriptive url of this site
+ '$thumb' => $importer['thumb'], // thumbnail url for sender icon
+ '$email' => $importer['email'], // email address to send to
+ '$url' => $importer['url'], // full url for the site
+ '$from' => $msg['from-name'], // name of the person sending the message
+ '$title' => stripslashes($msg['title']), // subject of the message
+ '$htmlversion' => $msg['htmlversion'], // html version of the message
+ '$mimeboundary' => $msg['mimeboundary'], // mime message divider
+ '$hostname' => $a->get_hostname() // name of this host
+ ));
- // import the data into the template
- $email_tpl = replace_macros($tpl, array(
+ // load the template for private message notifications
+ $tpl = load_view_file('view/mail_received_text_body_eml.tpl');
+ $email_text_body_tpl = replace_macros($tpl,array(
'$siteName' => $a->config['sitename'], // name of this site
'$siteurl' => $a->get_baseurl(), // descriptive url of this site
'$thumb' => $importer['thumb'], // thumbnail url for sender icon
@@ -222,11 +235,24 @@ function dfrn_notify_post(&$a) {
'$from' => $msg['from-name'], // name of the person sending the message
'$title' => stripslashes($msg['title']), // subject of the message
'$textversion' => $msg['textversion'], // text version of the message
- '$htmlversion' => $msg['htmlversion'], // html version of the message
'$mimeboundary' => $msg['mimeboundary'], // mime message divider
'$hostname' => $a->get_hostname() // name of this host
));
+ // load the template for private message notifications
+ $tpl = load_view_file('view/mail_received_eml.tpl');
+
+ // import the data into the template
+ $email_tpl = replace_macros($tpl, array(
+ '$email' => $importer['email'], // email address to send to
+ '$from' => $msg['from-name'], // name of the person sending the message
+ '$title' => stripslashes($msg['title']), // subject of the message
+ '$mimeboundary' => $msg['mimeboundary'], // mime message divider
+ '$hostname' => $a->get_hostname(), // name of this host
+ '$htmlbody' => chunk_split(base64_encode($email_html_body_tpl)),
+ '$textbody' => chunk_split(base64_encode($email_text_body_tpl))
+ ));
+
logger("message headers: " . $msg['headers']);
logger("message body: " . $mail_tpl);