<?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
namespace Friendica\Module;
$recipient = trim($recipient);
if (!filter_var($recipient, FILTER_VALIDATE_EMAIL)) {
- notice(DI::l10n()->t('%s : Not a valid email address.', $recipient) . EOL);
+ notice(DI::l10n()->t('%s : Not a valid email address.', $recipient));
continue;
}
}
$additional_headers = 'From: ' . $app->user['email'] . "\n"
- . 'Sender: ' . $app->getSenderEmailAddress() . "\n"
+ . 'Sender: ' . DI::emailer()->getSiteEmailAddress() . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit';
$current_invites++;
DI::pConfig()->set(local_user(), 'system', 'sent_invites', $current_invites);
if ($current_invites > $max_invites) {
- notice(DI::l10n()->t('Invitation limit exceeded. Please contact your site administrator.') . EOL);
+ notice(DI::l10n()->t('Invitation limit exceeded. Please contact your site administrator.'));
return;
}
} else {
- notice(DI::l10n()->t('%s : Message delivery failed.', $recipient) . EOL);
+ notice(DI::l10n()->t('%s : Message delivery failed.', $recipient));
}
}
- notice(DI::l10n()->tt('%d message sent.', '%d messages sent.', $total) . EOL);
+ info(DI::l10n()->tt('%d message sent.', '%d messages sent.', $total));
}
public static function content(array $parameters = [])