forked from friendica/friendica-addons
Fix errors in mailstream addon
This commit is contained in:
parent
1346a92505
commit
e488f597be
2 changed files with 3 additions and 2 deletions
|
@ -378,7 +378,7 @@ function mailstream_send(string $message_id, array $item, array $user): bool
|
||||||
if (!$address) {
|
if (!$address) {
|
||||||
$address = $user['email'];
|
$address = $user['email'];
|
||||||
}
|
}
|
||||||
$mail = new PHPmailer();
|
$mail = new PHPMailer();
|
||||||
try {
|
try {
|
||||||
$mail->XMailer = 'Friendica Mailstream Addon';
|
$mail->XMailer = 'Friendica Mailstream Addon';
|
||||||
$mail->SetFrom($frommail, mailstream_sender($item));
|
$mail->SetFrom($frommail, mailstream_sender($item));
|
||||||
|
|
|
@ -1519,6 +1519,7 @@ class PHPMailer
|
||||||
public function getSMTPInstance()
|
public function getSMTPInstance()
|
||||||
{
|
{
|
||||||
if (!is_object($this->smtp)) {
|
if (!is_object($this->smtp)) {
|
||||||
|
/** @phpstan-ignore-next-line file class.smtp.php does not exist */
|
||||||
$this->smtp = new SMTP;
|
$this->smtp = new SMTP;
|
||||||
}
|
}
|
||||||
return $this->smtp;
|
return $this->smtp;
|
||||||
|
@ -2705,7 +2706,7 @@ class PHPMailer
|
||||||
$file_buffer = $this->encodeString($file_buffer, $encoding);
|
$file_buffer = $this->encodeString($file_buffer, $encoding);
|
||||||
if ($magic_quotes) {
|
if ($magic_quotes) {
|
||||||
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
|
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
|
||||||
set_magic_quotes_runtime($magic_quotes);
|
//set_magic_quotes_runtime($magic_quotes);
|
||||||
} else {
|
} else {
|
||||||
ini_set('magic_quotes_runtime', $magic_quotes);
|
ini_set('magic_quotes_runtime', $magic_quotes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue