aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-28 17:49:48 -0700
committerMario Vavti <mario@mariovavti.com>2017-03-31 10:33:17 +0200
commit8b7d0f33c3917047d95d7abad193c22d4d899de7 (patch)
treecbe19586f9407e4d964e6a98c2e163760a0e4e47 /boot.php
parenta20fd4d4638fb07b6c1fcb652ce110a5ed98382d (diff)
downloadvolse-hubzilla-8b7d0f33c3917047d95d7abad193c22d4d899de7.tar.gz
volse-hubzilla-8b7d0f33c3917047d95d7abad193c22d4d899de7.tar.bz2
volse-hubzilla-8b7d0f33c3917047d95d7abad193c22d4d899de7.zip
fix a couple more instances where we were still calling mail() directly for site critical messages
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php54
1 files changed, 27 insertions, 27 deletions
diff --git a/boot.php b/boot.php
index 578c6b98a..4344bc766 100755
--- a/boot.php
+++ b/boot.php
@@ -2323,19 +2323,19 @@ function z_check_cert() {
*/
function cert_bad_email() {
-
- $email_tpl = get_intltext_template("cert_bad_eml.tpl");
- $email_msg = replace_macros($email_tpl, array(
- '$sitename' => App::$config['system']['sitename'],
- '$siteurl' => z_root(),
- '$error' => t('Website SSL certificate is not valid. Please correct.')
- ));
-
- $subject = email_header_encode(sprintf(t('[$Projectname] Website SSL error for %s'), App::get_hostname()));
- mail(App::$config['system']['admin_email'], $subject, $email_msg,
- 'From: Administrator' . '@' . App::get_hostname() . "\n"
- . 'Content-type: text/plain; charset=UTF-8' . "\n"
- . 'Content-transfer-encoding: 8bit' );
+ return z_mail(
+ [
+ 'toEmail' => \App::$config['system']['admin_email'],
+ 'messageSubject' => sprintf(t('[$Projectname] Website SSL error for %s'), App::get_hostname()),
+ 'textVersion' => replace_macros(get_intltext_template('cert_bad_eml.tpl'),
+ [
+ '$sitename' => App::$config['system']['sitename'],
+ '$siteurl' => z_root(),
+ '$error' => t('Website SSL certificate is not valid. Please correct.')
+ ]
+ )
+ ]
+ );
}
@@ -2446,20 +2446,20 @@ function check_cron_broken() {
return;
}
- $email_tpl = get_intltext_template("cron_bad_eml.tpl");
- $email_msg = replace_macros($email_tpl, array(
- '$sitename' => App::$config['system']['sitename'],
- '$siteurl' => z_root(),
- '$error' => t('Cron/Scheduled tasks not running.'),
- '$lastdate' => (($d)? $d : t('never'))
- ));
-
- $subject = email_header_encode(sprintf(t('[hubzilla] Cron tasks not running on %s'), App::get_hostname()));
- mail(App::$config['system']['admin_email'], $subject, $email_msg,
- 'From: Administrator' . '@' . App::get_hostname() . "\n"
- . 'Content-type: text/plain; charset=UTF-8' . "\n"
- . 'Content-transfer-encoding: 8bit' );
- return;
+ return z_mail(
+ [
+ 'toEmail' => \App::$config['system']['admin_email'],
+ 'messageSubject' => sprintf(t('[$Projectname] Cron tasks not running on %s'), App::get_hostname()),
+ 'textVersion' => replace_macros(get_intltext_template('cron_bad_eml.tpl'),
+ [
+ '$sitename' => App::$config['system']['sitename'],
+ '$siteurl' => z_root(),
+ '$error' => t('Cron/Scheduled tasks not running.'),
+ '$lastdate' => (($d)? $d : t('never'))
+ ]
+ )
+ ]
+ );
}