snappymail/snappymail/v/0.0.0/app/libraries/MailSo/Smtp/Settings.php
google-labs-jules[bot] 60696d03fd Update repository URLs to nextgen-networks while preserving deep links
Replaced bare references to the-djmaze/snappymail with nextgen-networks/snappymail/
and updated .git URLs to the new organization.

Per user request:
- README files are excluded.
- URLs with a trailing slash (e.g. issues, pull requests, releases) are
  left pointing to the original repository to preserve historical context.
- Bare web URLs now include the requested trailing slash.
- Existing nextgen-networks bare URLs were updated to include the trailing slash.

Co-authored-by: nextgen-networks <21206978+nextgen-networks@users.noreply.github.com>
2026-02-20 11:43:13 +00:00

67 lines
1.5 KiB
PHP

<?php
/*
* This file is part of MailSo.
*
* (c) 2022 DJMaze
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MailSo\Smtp;
/**
* @category MailSo
* @package Net
*/
class Settings extends \MailSo\Net\ConnectSettings
{
public int
$port = 25,
$timeout = 60;
public bool
$setSender = false,
$usePhpMail = false,
// https://github.com/the-djmaze/snappymail/issues/1038
$authPlainLine = false,
$viewErrors = false;
public string $Ehlo;
public function __construct()
{
parent::__construct();
$oConfig = \RainLoop\API::Config();
$this->viewErrors = !!$oConfig->Get('labs', 'smtp_show_server_errors', false);
}
public static function fromArray(array $aSettings) : self
{
$object = parent::fromArray($aSettings);
$object->useAuth = !empty($aSettings['useAuth']);
$object->setSender = !empty($aSettings['setSender']);
$object->usePhpMail = !empty($aSettings['usePhpMail']);
$object->authPlainLine = !empty($aSettings['authPlainLine']);
// $object->viewErrors = !empty($aSettings['viewErrors']);
return $object;
}
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return \array_merge(
parent::jsonSerialize(),
[
// '@Object' => 'Object/SmtpSettings',
'useAuth' => $this->useAuth,
'setSender' => $this->setSender,
'usePhpMail' => $this->usePhpMail,
'authPlainLine' => $this->authPlainLine
// 'viewErrors' => $this->viewErrors
]
);
}
}