mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-02 18:38:48 +03:00
Added Email::GetEmailUtf8()
This commit is contained in:
parent
913d7a8b32
commit
6cd36e0752
1 changed files with 9 additions and 4 deletions
|
|
@ -155,7 +155,7 @@ class Email implements \JsonSerializable
|
|||
|
||||
public function GetEmail(bool $bUtf8 = false): string
|
||||
{
|
||||
return $bUtf8 ? \SnappyMail\IDN::emailToUtf8($this->sEmail) : $this->sEmail;
|
||||
return $this->sEmail;
|
||||
}
|
||||
|
||||
public function GetEmailUtf8(): string
|
||||
|
|
@ -173,9 +173,14 @@ class Email implements \JsonSerializable
|
|||
return Utils::getEmailAddressLocalPart($this->sEmail);
|
||||
}
|
||||
|
||||
public function GetDomain(bool $bIdn = false): string
|
||||
public function GetDomain(): string
|
||||
{
|
||||
return Utils::getEmailAddressDomain($this->GetEmail($bIdn));
|
||||
return Utils::getEmailAddressDomain($this->GetEmail());
|
||||
}
|
||||
|
||||
public function GetDomainUtf8(): string
|
||||
{
|
||||
return Utils::getEmailAddressDomain($this->GetEmailUtf8());
|
||||
}
|
||||
|
||||
public function SetDkimStatus(string $sDkimStatus): void
|
||||
|
|
@ -187,7 +192,7 @@ class Email implements \JsonSerializable
|
|||
{
|
||||
$sReturn = '';
|
||||
if (\strlen($this->sEmail)) {
|
||||
$sReturn = $this->GetEmail($bUtf8);
|
||||
$sReturn = $bUtf8 ? $this->GetEmailUtf8() : $this->GetEmail();
|
||||
$sDisplayName = $this->sDisplayName;
|
||||
if (\strlen($sDisplayName)) {
|
||||
$sDisplayName = \str_replace('"', '\"', $sDisplayName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue