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.

This commit is contained in:
redmatrix
2016-10-01 03:06:01 -07:00
parent ad309f1036
commit fa94644bcf
6 changed files with 4886 additions and 4789 deletions

View File

@@ -59,12 +59,15 @@ class Invite extends \Zotlabs\Web\Controller {
$account = \App::get_account();
$res = mail($recip, sprintf( t('Please join us on $Projectname'), \App::$config['sitename']),
$nmessage,
"From: " . $account['account_email'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
$res = z_mail(
[
'toEmail' => $recip,
'fromName' => ' ',
'fromEmail' => $account['account_email'],
'messageSubject' => t('Please join us on $Projectname'),
'textVersion' => $nmessage,
]
);
if($res) {
$total ++;