Add explicit parameters to Sender::send() method signature

This commit is contained in:
nupplaPhil 2020-01-26 01:04:53 +01:00
parent eb18a0d761
commit b828762910
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
2 changed files with 4 additions and 20 deletions

View file

@ -82,15 +82,7 @@ function notifyall_post(App $a)
} }
foreach ($recips as $recip) { foreach ($recips as $recip) {
DI::emailer()->send([ DI::emailer()->send($sender_name, $sender_email, $sender_email, $recip['email'], $subject, $htmlversion, $textversion);
'fromName' => $sender_name,
'fromEmail' => $sender_email,
'replyTo' => $sender_email,
'toEmail' => $recip['email'],
'messageSubject' => $subject,
'htmlVersion' => $htmlversion,
'textVersion' => $textversion
]);
} }
notice(DI::l10n()->t('Emails sent')); notice(DI::l10n()->t('Emails sent'));

View file

@ -103,20 +103,12 @@ function securemail_settings_post(App &$a, array &$b)
$subject = 'Friendica - Secure Mail - Test'; $subject = 'Friendica - Secure Mail - Test';
$message = 'This is a test message from your Friendica Secure Mail addon.'; $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' => "<p>{$message}</p>",
'textVersion' => $message,
];
// enable addon for test // enable addon for test
DI::pConfig()->set(local_user(), 'securemail', 'enable', 1); 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, "<p>{$message}</p>", $message,
'', local_user());
// revert to saved value // revert to saved value
DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable); DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable);