19d470aa |
1 | <?php |
2 | |
3 | /** |
4 | * MessageHeader.class.php |
5 | * |
6 | * Copyright (c) 2002 The SquirrelMail Project Team |
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 | |
14 | class MessageHeader { |
15 | /** msg_header contains all variables available in a bodystructure **/ |
16 | /** entity like described in rfc2060 **/ |
17 | |
18 | var $type0 = '', |
19 | $type1 = '', |
20 | $parameters = array(), |
21 | $id = 0, |
22 | $description = '', |
23 | $encoding='', |
24 | $size = 0, |
25 | $md5='', |
26 | $disposition = '', |
27 | $language=''; |
28 | |
29 | /* |
30 | * returns addres_list of supplied argument |
31 | * arguments: array('to', 'from', ...) or just a string like 'to'. |
32 | * result: string: address1, addres2, .... |
33 | */ |
34 | |
35 | function setVar($var, $value) { |
36 | $this->{$var} = $value; |
37 | } |
38 | |
39 | function getParameter($p) { |
40 | $value = strtolower($p); |
41 | return (isset($this->parameters[$p]) ? $this->parameters[$p] : ''); |
42 | } |
43 | |
44 | function setParameter($parameter, $value) { |
45 | $this->parameters[strtolower($parameter)] = $value; |
46 | } |
47 | } |
48 | |
49 | ?> |