aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-25 21:40:19 -0800
committerzotlabs <mike@macgirvin.com>2018-02-25 21:40:19 -0800
commitd2ed3a9abbb5c68d1a02eae629bc103aa43a1263 (patch)
tree42a22345d211609b362eb3c382c9d21d2e4a7e16
parent1b1550fb318081a92ab92b90eda533117d112370 (diff)
downloadvolse-hubzilla-d2ed3a9abbb5c68d1a02eae629bc103aa43a1263.tar.gz
volse-hubzilla-d2ed3a9abbb5c68d1a02eae629bc103aa43a1263.tar.bz2
volse-hubzilla-d2ed3a9abbb5c68d1a02eae629bc103aa43a1263.zip
provide opt-out link and text with notification emails
-rw-r--r--Zotlabs/Lib/Enotify.php11
-rwxr-xr-xview/tpl/email_notify_html.tpl3
-rwxr-xr-xview/tpl/email_notify_text.tpl1
3 files changed, 14 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index c5bc706c2..1461a2e18 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -63,7 +63,9 @@ class Enotify {
$thanks = t('Thank You,');
$sitename = get_config('system','sitename');
$site_admin = sprintf( t('%s Administrator'), $sitename);
-
+ $opt_out1 = sprintf( t('This email was sent by %1$s at %2$s.'), t('$Projectname'), \App::get_hostname());
+ $opt_out2 = sprintf( t('To stop receiving these messages, please adjust your Notification Settings at %s'), z_root() . '/settings');
+ $hopt_out2 = sprintf( t('To stop receiving these messages, please adjust your %s.'), '<a href="' . z_root() . '/settings' . '">' . t('Notification Settings') . '</a>');
$sender_name = $product;
$hostname = \App::get_hostname();
if(strpos($hostname,':'))
@@ -613,6 +615,9 @@ class Enotify {
$datarray['titemlink'] = $itemlink;
$datarray['thanks'] = $thanks;
$datarray['site_admin'] = $site_admin;
+ $datarray['opt_out1'] = $opt_out1;
+ $datarray['opt_out2'] = $opt_out2;
+ $datarray['hopt_out2'] = $hopt_out2;
$datarray['title'] = stripslashes($title);
$datarray['htmlversion'] = $htmlversion;
$datarray['textversion'] = $textversion;
@@ -670,6 +675,8 @@ class Enotify {
'$hitemlink' => $datarray['hitemlink'],
'$thanks' => $datarray['thanks'],
'$site_admin' => $datarray['site_admin'],
+ '$opt_out1' => $datarray['opt_out1'],
+ '$opt_out2' => $datarray['hopt_out2'],
'$title' => $datarray['title'],
'$htmlversion' => $datarray['htmlversion'],
));
@@ -690,6 +697,8 @@ class Enotify {
'$titemlink' => $datarray['titemlink'],
'$thanks' => $datarray['thanks'],
'$site_admin' => $datarray['site_admin'],
+ '$opt_out1' => $datarray['opt_out1'],
+ '$opt_out2' => $datarray['opt_out2'],
'$title' => $datarray['title'],
'$textversion' => $datarray['textversion'],
));
diff --git a/view/tpl/email_notify_html.tpl b/view/tpl/email_notify_html.tpl
index 5b4954c8e..f4e12d793 100755
--- a/view/tpl/email_notify_html.tpl
+++ b/view/tpl/email_notify_html.tpl
@@ -21,6 +21,9 @@
<tr><td style="padding:11px 0;" colspan="2">{{$hitemlink}}</td></tr>
<tr><td></td><td>{{$thanks}}</td></tr>
<tr><td></td><td>{{$site_admin}}</td></tr>
+
+ <tr><td style="font-size: 12px; color: #444444; padding-top: 18px;" colspan="2">{{$opt_out1}}</td></tr>
+ <tr><td style="font-size: 12px; color: #444444;" colspan="2">{{$opt_out2}}</td></tr>
</tbody>
</table>
</body>
diff --git a/view/tpl/email_notify_text.tpl b/view/tpl/email_notify_text.tpl
index 56925c18b..5f1984edb 100755
--- a/view/tpl/email_notify_text.tpl
+++ b/view/tpl/email_notify_text.tpl
@@ -11,3 +11,4 @@
{{$thanks}}
{{$site_admin}}
+{{$opt_out1}} {{$opt_out2}} \ No newline at end of file