mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Add additional logging for OpenPGP
Remove enforcing lower case for email addresses Small fixes
This commit is contained in:
parent
436e54891e
commit
3498700f61
11 changed files with 89 additions and 17 deletions
|
|
@ -550,6 +550,22 @@ END;
|
|||
return \MailSo\Base\Utils::IsAscii($sValue) ? \strtoupper($sValue) : $sValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sValue
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function StrMailDomainToLowerIfAscii($sValue)
|
||||
{
|
||||
$aParts = \explode('@', $sValue, 2);
|
||||
if (!empty($aParts[1]))
|
||||
{
|
||||
$aParts[1] = \MailSo\Base\Utils::IsAscii($aParts[1]) ? \strtolower($aParts[1]) : $aParts[1];
|
||||
}
|
||||
|
||||
return \implode('@', $aParts);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sValue
|
||||
*
|
||||
|
|
@ -2415,7 +2431,7 @@ END;
|
|||
catch (\Exception $oException) {}
|
||||
}
|
||||
|
||||
return $bLowerIfAscii ? \MailSo\Base\Utils::StrToLowerIfAscii($sStr) : $sStr;
|
||||
return $bLowerIfAscii ? \MailSo\Base\Utils::StrMailDomainToLowerIfAscii($sStr) : $sStr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2426,7 +2442,7 @@ END;
|
|||
*/
|
||||
public static function IdnToAscii($sStr, $bLowerIfAscii = false)
|
||||
{
|
||||
$sStr = $bLowerIfAscii ? \MailSo\Base\Utils::StrToLowerIfAscii($sStr) : $sStr;
|
||||
$sStr = $bLowerIfAscii ? \MailSo\Base\Utils::StrMailDomainToLowerIfAscii($sStr) : $sStr;
|
||||
|
||||
$sUser = '';
|
||||
$sDomain = $sStr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue