From b8287629104fcfb1dbae2e72c0ae90ab615d6f7c Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Sun, 26 Jan 2020 01:04:53 +0100 Subject: [PATCH] Add explicit parameters to Sender::send() method signature --- notifyall/notifyall.php | 10 +--------- securemail/securemail.php | 14 +++----------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/notifyall/notifyall.php b/notifyall/notifyall.php index 7bee5923..2190a9d1 100644 --- a/notifyall/notifyall.php +++ b/notifyall/notifyall.php @@ -82,15 +82,7 @@ function notifyall_post(App $a) } foreach ($recips as $recip) { - DI::emailer()->send([ - 'fromName' => $sender_name, - 'fromEmail' => $sender_email, - 'replyTo' => $sender_email, - 'toEmail' => $recip['email'], - 'messageSubject' => $subject, - 'htmlVersion' => $htmlversion, - 'textVersion' => $textversion - ]); + DI::emailer()->send($sender_name, $sender_email, $sender_email, $recip['email'], $subject, $htmlversion, $textversion); } notice(DI::l10n()->t('Emails sent')); diff --git a/securemail/securemail.php b/securemail/securemail.php index 8b8a3fd8..1f7cd768 100644 --- a/securemail/securemail.php +++ b/securemail/securemail.php @@ -103,20 +103,12 @@ function securemail_settings_post(App &$a, array &$b) $subject = 'Friendica - Secure Mail - Test'; $message = 'This is a test message from your Friendica Secure Mail addon.'; - $params = [ - 'uid' => local_user(), - 'fromName' => $sitename, - 'fromEmail' => $sender_email, - 'toEmail' => $a->user['email'], - 'messageSubject' => $subject, - 'htmlVersion' => "

{$message}

", - 'textVersion' => $message, - ]; - // enable addon for test DI::pConfig()->set(local_user(), 'securemail', 'enable', 1); - $res = DI::emailer()->send($params); + $res = DI::emailer()->send($sitename, $sender_email, $sender_email, + $a->user['email'], $subject, "

{$message}

", $message, + '', local_user()); // revert to saved value DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable); -- 2.39.5