mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Resolve #1580
This commit is contained in:
parent
0dcc468ae1
commit
c3c75c216b
2 changed files with 9 additions and 8 deletions
|
|
@ -264,14 +264,15 @@ class Actions
|
|||
}
|
||||
|
||||
if ($oAccount) {
|
||||
$oDomain = $oAccount->Domain();
|
||||
$sLine = \str_replace('{imap:login}', $oAccount->ImapUser(), $sLine);
|
||||
$sLine = \str_replace('{imap:host}', $oDomain->ImapSettings()->host, $sLine);
|
||||
$sLine = \str_replace('{imap:port}', $oDomain->ImapSettings()->port, $sLine);
|
||||
|
||||
$sLine = \str_replace('{smtp:login}', $oAccount->SmtpUser(), $sLine);
|
||||
$sLine = \str_replace('{smtp:host}', $oDomain->SmtpSettings()->host, $sLine);
|
||||
$sLine = \str_replace('{smtp:port}', $oDomain->SmtpSettings()->port, $sLine);
|
||||
$oDomain = $oAccount->Domain();
|
||||
if ($oDomain) {
|
||||
$sLine = \str_replace('{imap:host}', $oDomain->ImapSettings()->host, $sLine);
|
||||
$sLine = \str_replace('{imap:port}', $oDomain->ImapSettings()->port, $sLine);
|
||||
$sLine = \str_replace('{smtp:host}', $oDomain->SmtpSettings()->host, $sLine);
|
||||
$sLine = \str_replace('{smtp:port}', $oDomain->SmtpSettings()->port, $sLine);
|
||||
}
|
||||
}
|
||||
|
||||
$aClear['/\{imap:([^}]*)\}/i'] = 'imap';
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ abstract class Account implements \JsonSerializable
|
|||
|
||||
private ?SensitiveString $oSmtpPass = null;
|
||||
|
||||
private Domain $oDomain;
|
||||
private ?Domain $oDomain = null;
|
||||
|
||||
public function Email() : string
|
||||
{
|
||||
|
|
@ -49,7 +49,7 @@ abstract class Account implements \JsonSerializable
|
|||
// return $this->sSmtpUser ?: $this->sEmail ?: $this->sImapUser;
|
||||
}
|
||||
|
||||
public function Domain() : Domain
|
||||
public function Domain() : ?Domain
|
||||
{
|
||||
return $this->oDomain;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue