Getting ready for 1.4.0 RC1
[squirrelmail.git] / class / mime / AddressStructure.class.php
CommitLineData
19d470aa 1<?php
2
3/**
4 * AddressStructure.class.php
5 *
76911253 6 * Copyright (c) 2003 The SquirrelMail Project Team
19d470aa 7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * This contains functions needed to handle mime messages.
10 *
11 * $Id$
12 */
13
14class AddressStructure {
15 var $personal = '',
16 $adl = '',
17 $mailbox = '',
18 $host = '',
19 $group = '';
20
21 function getAddress($full = true) {
22 $result = '';
23
24 if (is_object($this)) {
53bd5aa2 25 $email = ($this->host ? $this->mailbox.'@'.$this->host
26 : $this->mailbox);
27 if (trim($this->personal)) {
28 $addr = ($email ? '"' . $this->personal . '" <' .$email.'>'
29 : $this->personal);
19d470aa 30 $best_dpl = $this->personal;
31 } else {
32 $addr = $email;
33 $best_dpl = $email;
34 }
35 $result = ($full ? $addr : $best_dpl);
36 }
37 return $result;
38 }
39}
40
41?>