git subrepo clone https://github.com/mailcow/mailcow-dockerized.git mailcow/src/mailcow-dockerized
subrepo: subdir: "mailcow/src/mailcow-dockerized"
merged: "a832becb"
upstream: origin: "https://github.com/mailcow/mailcow-dockerized.git"
branch: "master"
commit: "a832becb"
git-subrepo: version: "0.4.3"
origin: "???"
commit: "???"
Change-Id: If5be2d621a211e164c9b6577adaa7884449f16b5
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php
new file mode 100644
index 0000000..b88e0f9
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php
@@ -0,0 +1,84 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Ddeboer\Imap\Message;
+
+/**
+ * An e-mail address.
+ */
+final class EmailAddress
+{
+ /**
+ * @var string
+ */
+ private $mailbox;
+
+ /**
+ * @var null|string
+ */
+ private $hostname;
+
+ /**
+ * @var null|string
+ */
+ private $name;
+
+ /**
+ * @var null|string
+ */
+ private $address;
+
+ public function __construct(string $mailbox, string $hostname = null, string $name = null)
+ {
+ $this->mailbox = $mailbox;
+ $this->hostname = $hostname;
+ $this->name = $name;
+
+ if (null !== $hostname) {
+ $this->address = $mailbox . '@' . $hostname;
+ }
+ }
+
+ /**
+ * @return null|string
+ */
+ public function getAddress()
+ {
+ return $this->address;
+ }
+
+ /**
+ * Returns address with person name.
+ */
+ public function getFullAddress(): string
+ {
+ $address = \sprintf('%s@%s', $this->mailbox, $this->hostname);
+ if (null !== $this->name) {
+ $address = \sprintf('"%s" <%s>', \addcslashes($this->name, '"'), $address);
+ }
+
+ return $address;
+ }
+
+ public function getMailbox(): string
+ {
+ return $this->mailbox;
+ }
+
+ /**
+ * @return null|string
+ */
+ public function getHostname()
+ {
+ return $this->hostname;
+ }
+
+ /**
+ * @return null|string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+}