fixed phpdoc formating. require() call loaded before first phpdoc block.
[squirrelmail.git] / class / mime / AddressStructure.class.php
index 2fa3af373931c0425255fa43adeeb511fe611482..0c0f7e1ed939d616cc1bd19e0efc1dbf669d71dd 100644 (file)
@@ -97,6 +97,17 @@ class AddressStructure {
     function getEncodedAddress() {
         return $this->getAddress(true, true);
     }
+    
+    /**
+     * Return just the email portion of this address
+     * @return string
+     * @since 1.5.2
+     */
+    function getEmail () {
+        $r = '';
+        if (is_object($this)) {
+            $r = $this->host ? $this->mailbox.'@'.$this->host : $this->mailbox;
+        }
+        return $r;
+    }
 }
-
-?>
\ No newline at end of file