}
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'));
$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' => "<p>{$message}</p>",
- '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, "<p>{$message}</p>", $message,
+ '', local_user());
// revert to saved value
DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable);