From 015d45a6b194fe33cdd1c3b3ae3167e11cd0ce2d Mon Sep 17 00:00:00 2001 From: aydreeihn <adriane@enhancesoft.com> Date: Tue, 4 Sep 2018 14:20:17 -0500 Subject: [PATCH] Email Name Format This commit further corrects issues where emails were being sent out with names being improperly formatted if the name format is set as 'Last, First' or if it has special characters. --- include/class.collaborator.php | 2 +- include/class.user.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class.collaborator.php b/include/class.collaborator.php index dc35a436f..65deaf8e4 100644 --- a/include/class.collaborator.php +++ b/include/class.collaborator.php @@ -41,7 +41,7 @@ implements EmailContact, ITicketUser { return Format::htmlchars($this->toString()); } function toString() { - return sprintf('%s <%s>', $this->getName(), $this->getEmail()); + return sprintf('"%s" <%s>', $this->getName(), $this->getEmail()); } function getId() { diff --git a/include/class.user.php b/include/class.user.php index 53a8627c3..0fa35e4a1 100644 --- a/include/class.user.php +++ b/include/class.user.php @@ -678,7 +678,7 @@ implements TemplateVariable { $this->getDomain()); if ($this->getName()) - $this->address = sprintf('%s <%s>', + $this->address = sprintf('"%s" <%s>', $this->getName(), $this->email); } -- GitLab