MessageHeader.class.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * MessageHeader.class.php
  4. *
  5. * Copyright (c) 2003-2004 The SquirrelMail Project Team
  6. * Licensed under the GNU GPL. For full terms see the file COPYING.
  7. *
  8. * This contains functions needed to handle mime messages.
  9. *
  10. * @version $Id$
  11. * @package squirrelmail
  12. */
  13. /**
  14. * Contains all variables available in a bodystructure
  15. * @package squirrelmail
  16. */
  17. class MessageHeader {
  18. /** msg_header contains all variables available in a bodystructure **/
  19. /** entity like described in rfc2060 **/
  20. var $type0 = '',
  21. $type1 = '',
  22. $parameters = array(),
  23. $id = 0,
  24. $description = '',
  25. $encoding='',
  26. $size = 0,
  27. $md5='',
  28. $disposition = '',
  29. $language='';
  30. /*
  31. * returns addres_list of supplied argument
  32. * arguments: array('to', 'from', ...) or just a string like 'to'.
  33. * result: string: address1, addres2, ....
  34. */
  35. function setVar($var, $value) {
  36. $this->{$var} = $value;
  37. }
  38. function getParameter($p) {
  39. $value = strtolower($p);
  40. return (isset($this->parameters[$p]) ? $this->parameters[$p] : '');
  41. }
  42. function setParameter($parameter, $value) {
  43. $this->parameters[strtolower($parameter)] = $value;
  44. }
  45. }
  46. ?>