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 // Attachments
$files = $this->app->erp->GetDateiSubjektObjektDateiname('Anhang','Ticket',$drafted_messages[0]['id'],""); $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); preg_match_all($pattern, $drafted_messages[0]['mail'], $matches);
$to = $matches[0]; $to = $matches[0];
if ($drafted_messages[0]['mail_cc'] != '') { 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); preg_match_all($pattern, $drafted_messages[0]['mail_cc'], $matches);
$cc = $matches[0]; $cc = $matches[0];
} else { } else {