aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Enotify.php
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-10-01 03:06:01 -0700
committerredmatrix <mike@macgirvin.com>2016-10-01 03:06:01 -0700
commitfa94644bcfd5bb3ef9c4149d6503846a09975297 (patch)
tree7d04194a6fbb80c43af722fc20cb4a39574eabf4 /Zotlabs/Lib/Enotify.php
parentad309f1036d9d85899c3d3199070d92dd96b1710 (diff)
downloadvolse-hubzilla-fa94644bcfd5bb3ef9c4149d6503846a09975297.tar.gz
volse-hubzilla-fa94644bcfd5bb3ef9c4149d6503846a09975297.tar.bz2
volse-hubzilla-fa94644bcfd5bb3ef9c4149d6503846a09975297.zip
Unify the various mail sending instance to enotify::send() and z_mail(). Both take the same arguments. z_mail() is text only, enotify::send() provides html and text. Both are pluggable using the enotfy_send hook.
Diffstat (limited to 'Zotlabs/Lib/Enotify.php')
-rw-r--r--Zotlabs/Lib/Enotify.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index 87a51b3a4..c25834a1f 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -71,9 +71,21 @@ class Enotify {
// Do not translate 'noreply' as it must be a legal 7-bit email address
- $sender_email = get_config('system','reply_address');
+ $reply_email = get_config('system','reply_address');
+ if(! $reply_email)
+ $reply_email = 'noreply' . '@' . $hostname;
+
+ $sender_email = get_config('system','from_email');
if(! $sender_email)
- $sender_email = 'noreply' . '@' . $hostname;
+ $sender_email = 'Administrator' . '@' . App::get_hostname();
+
+
+ $sender_name = get_config('system','from_email_name');
+ if(! $sender_name)
+ $sender_name = Zotlabs\Lib\System::get_site_name();
+
+
+
$additional_mail_header = "";
@@ -586,7 +598,7 @@ class Enotify {
self::send(array(
'fromName' => $sender_name,
'fromEmail' => $sender_email,
- 'replyTo' => $sender_email,
+ 'replyTo' => $reply_email,
'toEmail' => $recip['account_email'],
'messageSubject' => $datarray['subject'],
'htmlVersion' => $email_html_body,