bugfix ticket system mail addresses with long tld > 4 characters

This commit is contained in:
OpenXE 2023-01-18 14:41:12 +01:00
parent cb3191393a
commit d89c23ad0e

View File

@ -776,12 +776,12 @@ class Ticket {
// Attachments
$files = $this->app->erp->GetDateiSubjektObjektDateiname('Anhang','Ticket',$drafted_messages[0]['id'],"");
$pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,4})(?:\.[a-z]{2})?/i';
$pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,63})(?:\.[a-z]{2})?/i';
preg_match_all($pattern, $drafted_messages[0]['mail'], $matches);
$to = $matches[0];
if ($drafted_messages[0]['mail_cc'] != '') {
$pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,4})(?:\.[a-z]{2})?/i';
preg_match_all($pattern, $drafted_messages[0]['mail_cc'], $matches);
$cc = $matches[0];
} else {