Renaming - part 2 :-)
This commit is contained in:
parent
765a0d8892
commit
6350b210a6
3 changed files with 8 additions and 8 deletions
|
@ -14,7 +14,7 @@ use Friendica\Object\Email;
|
||||||
*/
|
*/
|
||||||
class ItemCCEMail extends Email
|
class ItemCCEMail extends Email
|
||||||
{
|
{
|
||||||
public function __construct(App $a, L10n $l10n, BaseURL $baseUrl, array $item, string $toEmail, string $authorThumb)
|
public function __construct(App $a, L10n $l10n, BaseURL $baseUrl, array $item, string $toAddress, string $authorThumb)
|
||||||
{
|
{
|
||||||
$disclaimer = '<hr />' . $l10n->t('This message was sent to you by %s, a member of the Friendica social network.', $a->user['username'])
|
$disclaimer = '<hr />' . $l10n->t('This message was sent to you by %s, a member of the Friendica social network.', $a->user['username'])
|
||||||
. '<br />';
|
. '<br />';
|
||||||
|
@ -29,7 +29,7 @@ class ItemCCEMail extends Email
|
||||||
$html = Item::prepareBody($item);
|
$html = Item::prepareBody($item);
|
||||||
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';;
|
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';;
|
||||||
|
|
||||||
parent::__construct($a->user['username'], $a->user['email'], $a->user['email'], $toEmail,
|
parent::__construct($a->user['username'], $a->user['email'], $a->user['email'], $toAddress,
|
||||||
$subject, $message, HTML::toPlaintext($html . $disclaimer));
|
$subject, $message, HTML::toPlaintext($html . $disclaimer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,14 @@ class Email implements IEmail
|
||||||
/** @var int|null */
|
/** @var int|null */
|
||||||
private $toUid = null;
|
private $toUid = null;
|
||||||
|
|
||||||
public function __construct(string $fromName, string $fromEmail, string $replyTo, string $toEmail,
|
public function __construct(string $fromName, string $fromAddress, string $replyTo, string $toAddress,
|
||||||
string $subject, string $msgHtml, string $msgText,
|
string $subject, string $msgHtml, string $msgText,
|
||||||
string $additionalMailHeader = '', int $toUid = null)
|
string $additionalMailHeader = '', int $toUid = null)
|
||||||
{
|
{
|
||||||
$this->fromName = $fromName;
|
$this->fromName = $fromName;
|
||||||
$this->fromAddress = $fromEmail;
|
$this->fromAddress = $fromAddress;
|
||||||
$this->replyTo = $replyTo;
|
$this->replyTo = $replyTo;
|
||||||
$this->toAddress = $toEmail;
|
$this->toAddress = $toAddress;
|
||||||
$this->subject = $subject;
|
$this->subject = $subject;
|
||||||
$this->msgHtml = $msgHtml;
|
$this->msgHtml = $msgHtml;
|
||||||
$this->msgText = $msgText;
|
$this->msgText = $msgText;
|
||||||
|
|
|
@ -59,7 +59,7 @@ class Emailer
|
||||||
}
|
}
|
||||||
|
|
||||||
$fromName = Email::encodeHeader(html_entity_decode($email->getFromName(), ENT_QUOTES, 'UTF-8'), 'UTF-8');
|
$fromName = Email::encodeHeader(html_entity_decode($email->getFromName(), ENT_QUOTES, 'UTF-8'), 'UTF-8');
|
||||||
$fromEmail = $email->getFromAddress();
|
$fromAddress = $email->getFromAddress();
|
||||||
$replyTo = $email->getReplyTo();
|
$replyTo = $email->getReplyTo();
|
||||||
$messageSubject = Email::encodeHeader(html_entity_decode($email->getSubject(), ENT_QUOTES, 'UTF-8'), 'UTF-8');
|
$messageSubject = Email::encodeHeader(html_entity_decode($email->getSubject(), ENT_QUOTES, 'UTF-8'), 'UTF-8');
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class Emailer
|
||||||
|
|
||||||
// generate a multipart/alternative message header
|
// generate a multipart/alternative message header
|
||||||
$messageHeader = $email->getAdditionalMailHeader() .
|
$messageHeader = $email->getAdditionalMailHeader() .
|
||||||
"From: $fromName <{$fromEmail}>\n" .
|
"From: $fromName <{$fromAddress}>\n" .
|
||||||
"Reply-To: $fromName <{$replyTo}>\n" .
|
"Reply-To: $fromName <{$replyTo}>\n" .
|
||||||
"MIME-Version: 1.0\n" .
|
"MIME-Version: 1.0\n" .
|
||||||
"Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\"";
|
"Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\"";
|
||||||
|
@ -95,7 +95,7 @@ class Emailer
|
||||||
"--" . $mimeBoundary . "--\n"; // message ending
|
"--" . $mimeBoundary . "--\n"; // message ending
|
||||||
|
|
||||||
if ($this->config->get('system', 'sendmail_params', true)) {
|
if ($this->config->get('system', 'sendmail_params', true)) {
|
||||||
$sendmail_params = '-f ' . $fromEmail;
|
$sendmail_params = '-f ' . $fromAddress;
|
||||||
} else {
|
} else {
|
||||||
$sendmail_params = null;
|
$sendmail_params = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue